s1=raw_input() s2=raw_input() s3=raw_input() if s1==s2 or s2==s3: print s2 else: print s1