T={} T["watermelon"]=1 T["beachball"]=1 T["shrinebell"]=1 s=input() t=input() l=[s,t] for k in T: if not k in l: print(k)