#include <bits/stdc++.h>
using namespace std;
int main(){
    int x,y,z,c = 0;
    cin>>x>>y>>z;
    double v = (x + y + z) / 3.0;
    if(v >= 90){
    	if(x >= 90) c++;
		if(y >= 90) c++;
		if(z >= 90) c++;
		
		if(c == 3) cout<<"beijing";
		else if(c == 2) cout<<"xiamen";
		else cout<<"guilin";
	}else if(v >= 85){
		if(x >= 85) c++;
		if(y >= 85) c++;
		if(z >= 85) c++;
		
		if(c == 3) cout<<"shanghai";
		else cout<<"nanjing";
	}
}
/**************************************************************
	Problem: 1679
	User: admin
	Language: C++
	Result: Accepted
	Time:38 ms
	Memory:2072 kb
****************************************************************/