for s in open(0):print(s[2<<(s[1]!=s[2])])