#include using namespace std; string S, T; int main() { cin >> S >> T; if (S != "watermelon" && T != "watermelon") cout << "watermelon" << endl; else if (S != "beachball" && T != "beachball") cout << "beachball" << endl; else cout << "shrinebell" << endl; return 0; }