func padLeft(_ instr: String, _ len:Int)-> String { var tmp = "" for _ in instr.count...len { tmp += "0" } return tmp + instr } let person1 = readLine()!.split(separator: " ").map(String.init) let person2 = readLine()!.split(separator: " ").map(String.init) let mojilen = max(person1[1].count, person2[1].count) let yuru1 = padLeft(person1[1], mojilen) let yuru2 = padLeft(person2[1], mojilen) if(yuru1 == yuru2) { print(-1) } else if(yuru1>yuru2) { print(person1[0]) } else { print(person2[0]) }