#include<bits/stdc++.h>
using namespace std;
int main(){
int x,y,z;
cin>>x>>y>>z;
if (x>=90 && y>=90 && z>=90){
cout<<"beijing"<<endl;
}
else {
cout<<"nanjing"<<endl;
}
return 0;
}
/**************************************************************
Problem: 1627
User: xiaojingxuan
Language: C++
Result: Wrong Answer
****************************************************************/