class Yuki { String name; long yurufuwa; String hand; String judge(Yuki y) { if (this.yurufuwa == y.yurufuwa) { return "-1"; } else { return this.yurufuwa > y.yurufuwa ? 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.nextLong(); yuki[i].hand = sc.next(); } System.out.println(yuki[0].judge(yuki[1])); sc.close(); } }