#include "hamle.h"
#include "tahta.h"
#include <iostream>
#include <conio.h>

using namespace std;

int main(){

	Tahta t = Tahta();
	try{
		for(int i =0;i<15;i++){
			int x,y;
			cin>>x;
			cin>>y;
			t.oyna(x,y);
			t.bas();

		}
	}catch(kazanma k){
		t.bas();
		if(k.getKim()==1)

			cout << "kazanan: X" << endl;
		else
			cout << "kazanan: O" << endl;
	}
	getch();
}
