S = input() T = input() se = {"watermelon", "beachball", "shrinebell"} se.remove(S) se.remove(T) for s in se: print(s) break