https://www.acmicpc.net/problem/2908
def change(n): a=int(n/100) b=int((n%100)/10) c=n%10 return c*100+b*10+a s=list(map(int,input().split())) n=s[0] m=s[1] if change(n)>=change(m): print(change(n)) else: print(change(m))