s1, p1 = gets.split s2, p2 = gets.split case p1.to_i <=> p2.to_i when 0 p -1 when 1 puts s1 else puts s2 end