S=input() T=input() for ans in ("watermelon","beachball","shrinebell"): if not ans in (S,T): print(ans)