using System;
public class Program
{
public static void Main()
int a, b, c, d , e, f , g, k;
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
// calculations for "a"
c = a % 10;
d = a % 100 / 10;
e = a % 1000 / 100;
// calculations for "b"
f = b % 10;
g = b % 100 / 10;
k = b % 1000 / 100;
Console.Write(k);
Console.Write(e);
Console.Write(g);
Console.Write(d);
Console.Write(f);
Console.Write(c);
}