while s:=input(): if s[1]!=s[2]:print(s[4]) else:print(s[2])