#include<bits/stdc++.h>

using namespace std;
string a;
int main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	cin>>a;
	if(a=='qdbp' || a=='pdbq' || a=='qbdp' || a=='pbdq') 
	else cout<<"no";
	return 0;
}
