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