c = ["watermelon", "beachball", "shrinebell"] d = [] s = input() t = input() d.append(s) d.append(t) print(*(set(c) - set(d)))