X = ["watermelon", "beachball", "shrinebell"] S = input() T = input() for x in X: if S != x != T: print(x)