#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";
else cout<<"nanjing"
return 0;
}
/**************************************************************
Problem: 1627
User: ccf
Language: C++
Result: Compile Error
****************************************************************/