S = input().strip() T = input().strip() items = {"watermelon", "beachball", "shrinebell"} items.remove(S) items.remove(T) print(items.pop())