def fun(): res = WBS for _ in range(2): s = input() if {s} <= res: res -= {s} return res.pop() WBS = {"watermelon", "beachball", "shrinebell"} print(fun())