l=['watermelon','beachball','shrinebell'] s=input() t=input() for i in range(3): if s in l: l.remove(s) if t in l: l.remove(t) print(*l)