s = {"watermelon","beachball","shrinebell"} for _ in range(2): S = input() s.remove(S) print(s.pop())