import strutils let SA, SB = stdin.readLine.split case SA[1].len - SB[1].len: of 1 .. int.high: echo SA[0] of int.low .. -1: echo SB[0] else: for i, v in SA[1]: case ($SA[1][i]).parseInt - ($SB[1][i]).parseInt: of 1 .. int.high: echo SA[0] of int.low .. -1: echo SB[0] else: continue quit() echo -1