class Yuki { String name; java.math.BigInteger yurufuwa; String hand; String judge(Yuki y) { int i = this.yurufuwa.compareTo(y.yurufuwa); if (i == 0) { return "-1"; } else { return i > 0 ? this.name : y.name; } } } class No_201 { public static void main(String[] args) { java.util.Scanner sc = new java.util.Scanner(System.in); Yuki[] yuki = new Yuki[2]; for (int i = 0; i < yuki.length; i++) { yuki[i] = new Yuki(); yuki[i].name = sc.next(); yuki[i].yurufuwa = sc.nextBigInteger(); yuki[i].hand = sc.next(); } System.out.println(yuki[0].judge(yuki[1])); sc.close(); } }