func main() var sa: []char :: cui@inputStr() var pa: []char :: cui@inputStr() do cui@inputStr() var sb: []char :: cui@inputStr() var pb: []char :: cui@inputStr() var ans: []char :: "-1" var res: int :: f(pa, pb) if(res > 0) do ans :: sa elif(res < 0) do ans :: sb end if do cui@print("\{ans}\n") func f(pa: []char, pb: []char): int if(^pa <> ^pb) ret ^ pa - ^pb end if for i(0, ^pa - 1) if(pa[i] $ int <> pb[i] $ int) ret pa[i] $ int - pb[i] $ int end if end for ret 0 end func end func