S = input() T = input() a = ["watermelon","beachball","shrinebell"] for i in range(3): if a[i] != S and a[i] != T: print(a[i]) break