S=input() T=input() Set=set('watermelon,beachball,shrinebell'.split(',')) Set.remove(S) Set.remove(T) print(list(Set)[0])