#include <iostream>
#include <cstring>
//#include <cstdio>
using namespace std;
int main()
{
// freopen("in.in", "r", stdin);
int N, len, turn, i, j, score[2];
char str[120], xo[2][10];
while(cin >> N && N != 0)
{
cin.get();//吃掉空格
turn = 0;
i = 0;
score[0] = score[1] = 0;
for(j = 0; j < N; j++)
{
cin.getline(str, 120);
len = strlen(str);
if(len - 8 > 0 && strcmp(str + len - 8, " no good") == 0)
xo[turn][i] = 'X';
else
{
xo[turn][i] = 'O';
score[tur