import strscans let (_, sa, pa) = stdin.readLine.scanTuple"$w $i" (_, sb, pb) = stdin.readLine.scanTuple"$w $i" echo: case cmp(pa, pb): of 0: "-1" of 1: sa else: sb