S = input() T = input() SET = set(["watermelon", "beachball", "shrinebell"]) SET.remove(S) SET.remove(T) print(SET.pop())