while 1:h=input();a,b=[list(map(x.find,x))for x in h.split()];a==b!=print(h)