#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); string s,t; cin>>s>>t; if(s>t) swap(s,t); if(s[0]=='s') cout<<"beachball"<<endl; else if(t[0]=='w') cout<<"shrinebell"<<endl; else cout<<"watermelon"<<endl; return 0; }