#include<stdio.h>
char stack[10001];
char stack2[10001];
char data1[10000];
char data2[10000];
long long int top=-1,top2=-1,i,n,sum;
int main()
{
scanf("%s", data1);
scanf("%s", data2);
for(i=strlen(data1)-1; i>=0; i--)
{
top++;
stack[top]=data1[i];
}
for(i=strlen(data2)-1; i>=0; i--)
{
top2++;
stack2[top2]=data2[i];
}
while(top!=-1)
{
printf("%c", stack[top]);
top--;
}
while(top2!=-1)
{
printf("%c", stack2[top2]);
top2--;
}
}