print(({"watermelon","beachball","shrinebell"}-{input(),input()}).pop())