ss= {"watermelon","beachball","shrinebell"} s=input() t=input() for i in [s,t]: ss.remove(i) print(*ss)