s = set() s.add(input()) s.add(input()) p = {"watermelon", "beachball", "shrinebell"} d = s ^ p print(list(d)[0])