s, t = input(), input() a = ['watermelon', 'beachball', 'shrinebell'] for u in a: if s != u and t != u: print(u) exit()