import strutils var sa, sb: string pa, pb: string xa, xb: string res:string = nil proc conv(ch:char): int = result = ch.int - '0'.int var scan = stdin.readLine.split sa = scan[0] pa = scan[1] scan = stdin.readLine.split sb = scan[0] pb = scan[1] if pa.len < pb.len: res = sb elif pa.len > pb.len: res = sa else: for i in 0.. y: res = sa break if res == nil: res = "-1" echo res