S = input() T = input() se = {"watermelon", "beachball", "shrinebell"} se.remove(S) se.remove(T) print(se.pop())