#include<bits/stdc++.h>
using namespace std;
int main(){
	int x,y,z;
	float q;
	cin>>x>>y>>z;
	q=(x+y+z)/3.0;
	if (q>=90){
		if (x>=90 && y>=90 && z>=90){
			cout<<"beijing"<<endl;
		}
		else if (x>=90 && y>=90 || x>=90 && z>=90 || y>=90 && z>=90){
			cout<<"xiamen"<<endl;
		}
		else {
			cout<<"guilin"<<endl;
		}
	}
	else if (q<90 && q>=85){
		if (x>=85 && y>=85 && z>=85){
			cout<<"shanghai"<<endl;
		}
		else {
			cout<<"nanjing"<<endl;
		}
	}
	return 0;
}
/**************************************************************
	Problem: 1679
	User: xiaojingxuan
	Language: C++
	Result: Accepted
	Time:24 ms
	Memory:2072 kb
****************************************************************/