#include<bits/stdc++.h>
using namespace std;
int main(){
int x,y,z;
scanf("%d %d %d",&x,&y,&z);
if(x>=90){
cout<<"beijing";
}else if(y>=90){
cout<<"beijing";
}else if(z>=90){
cout<<"beijing";
}else{
cout<<"nanjing";
}
}
/**************************************************************
Problem: 1627
User: zhengzihao3
Language: C++
Result: Accepted
Time:16 ms
Memory:2072 kb
****************************************************************/