a,b=gets.split if a.size!=b.size puts a.size>b.size ? a: b else for i in 0...a.size x=a[i].to_i;y=b[i].to_i;c=(x*y==28?-1:1)*(x==y ?0:x>y ?1: -1) if c!=0;puts c>0 ?a: b;exit 0;end end end