S=input() T=input() A=[S[0],T[0]] if 'b' not in A: print('beachball') if 'w' not in A: print('watermelon') if 's' not in A: print('shrinebell')