A={"watermelon","beachball","shrinebell"} S=input() T=input() X=A-{S}-{T} print(list(X)[0])