#include <iostream>
using namespace std;
enum {BELIEVER=0,NONBELIEVER};
int main()
{
unsigned short people[30] = {BELIEVER};
unsigned short surviver = 30;
unsigned short index = 0;
while(surviver > 15)
{
unsigned short count = 0;
while(1)
{
if(people[index] == BELIEVER)
{
count++;
if(count == 9) break;
}
index++;
if(index == 30) index = 0;
}
people[index] = NONBELIEVER;
surviver--;
}
for(index=0;index<30;index++)
{
if(people[index] == BELIEVER)
cout<<"BELIEVER ";
else cout<<"NONBELIEVER ";
}
cout<<endl;
return 0;
}