public static void main(String args[]) throws Exception
		{
			try
			{
			int depth=Integer.parseInt(args[2]);
			//int depth=3;
			FileReader in = new FileReader(args[0]);
			BufferedReader br = new BufferedReader(in);
			String test=br.readLine();		
			FileWriter out = new FileWriter(args[1]);
			BufferedWriter write = new BufferedWriter(out);
			
			//String test="WWWxxxxxxxxxxxxxxxxxBB";
			char[] board=new char[22];
			board=test.toCharArray();
			// NEW ROUTINE TO CHANGE TO WHITE TO BLACK and REVERSE
			char[] board2=new char[22];
			for(int j=0;j<22;j++)
			{
				if(board[j]=='W') board2[j]='B';
				if(board[j]=='B') board2[j]='W';
				if(board[j]=='x') board2[j]='x';
			}
			int Min=MinMax(board2,depth);
			char[] best=bestmove.toCharArray();
			char[] bestmove_update=new char[22];
			for(int j=0;j<22;j++)
			{
				if(best[j]=='W') bestmove_update[j]='B';
				if(best[j]=='B') bestmove_update[j]='W';
				if(best[j]=='x') bestmove_update[j]='x';
			}
			String bestmove2=new String(bestmove_update);
			System.out.println(bestmove2);
			System.out.println("MinMax Estimate="+Min);
			System.out.println("Positions Evaluated:"+count_min);
			out.write(bestmove2);
			out.close();
			//System.out.println(Alphabeta(board,depth,-10000,10000,'W'));
			}catch(Exception e){}
			
			

	}