/* Задача "Шашки"
 * Интернет олимпиады для школьников. Сезон 2006 - 2007
 * Автор задачи:  Александр Торопов, toropov@rain.ifmo.ru
 * Автор решения: Александр Торопов, toropov@rain.ifmo.ru
 */

import java.io.*;
import java.util.*;


public class checkers_at implements Runnable {
	BufferedReader in;
	PrintWriter out;
	final static int EMPTY = 0;
	final static int BLACK = 2;
	final static int FIC_BLACK = 3;
	final static int WHITE = 5;
	final static int FIC_WHITE = 6;
	
	class Pair {
		public int x, y;
		
		public Pair(int X, int Y) {
			x = X;
			y = Y;
		}
		
		public void print() {
			out.print("(" + (x + 1) + ", " + (y + 1) + ")");
		}
	}
	
	int board[][] = new int[8][8];

	void dfs(int x, int y, int color) {
		if (board[x][y] == EMPTY) {
			board[x][y] = color;
		}
		for(int dx = -1; dx <= 1; ++dx) {
			for(int dy = -1; dy <= 1; ++dy) {
				if (dx * dy == 0) {
					continue;
				}
				if (x + dx < 0 || x + dx >= 8 || y + dy < 0 || y + dy >= 8) {
					continue;
				}
				if (x + 2 * dx < 0 || x + 2 * dx >= 8 || y + 2 * dy < 0 || y + 2 * dy >= 8) {
					continue;
				}
				if (board[x + dx][y + dy] != EMPTY && Math.abs(board[x + dx][y + dy] - color) != 1) {
					if (board[x + 2 * dx][y + 2 * dy] == EMPTY) {
						dfs(x + 2 * dx, y + 2 * dy, color);
					}
				}
			}
		}
	}
	
	public void print() {
		String str = ". Bb Ww";
		for(int i = 0; i < 8; ++i) {
			for(int j = 0; j < 8; ++j) {
				out.print(str.charAt(board[i][j]));
			}
			out.println();
		}
		out.println();
	}
	
	public void solve(String name) throws IOException {
		in = new BufferedReader(new FileReader(name + ".in"));
		out = new PrintWriter(new File(name + ".out"));
		
		for(int i = 0; i < 8; ++i) {
			for(int j = 0; j < 8; ++j) {
				int a = in.read();
				if (a == '.') {
					board[i][j] = EMPTY;
				}
				else if (a == 'W') {
					board[i][j] = WHITE;
				}
				else if (a == 'B'){
					board[i][j] = BLACK;
				}
				else
					--j;
			}
		}
		
		for(int i = 0; i < 8; ++i) {
			for(int j = 0; j < 8; ++j) {
				if (board[i][j] == WHITE) {
					dfs(i, j, FIC_WHITE);
				}
			}
		}
		
		ArrayList<Pair> ans_white = new ArrayList<Pair>();
		for(int x = 0; x < 8; ++x) {
			for(int y = 0; y < 8; ++y) {
				if (board[x][y] == FIC_WHITE || board[x][y] == WHITE) {
					for(int dx = -1; dx <= 1; ++dx) {
						for(int dy = -1; dy <= 1; ++dy) {
							if (dx * dy == 0)
								continue;
							if (x + dx < 0 || x + dx >= 8 || y + dy < 0 || y + dy >= 8) {
								continue;
							}
							if (x + 2 * dx < 0 || x + 2 * dx >= 8 || y + 2 * dy < 0 || y + 2 * dy >= 8) {
								continue;
							}
							if (board[x + dx][y + dy] == BLACK) {
								if (!(board[x + 2 * dx][y + 2 * dy] == WHITE && board[x][y] == WHITE) && 
										(board[x + 2 * dx][y + 2 * dy] == WHITE || board[x + 2 * dx][y + 2 * dy] == FIC_WHITE)) {
									Pair new_v = new Pair(x + dx, y + dy);
									boolean add = true;
									for(int k = 0; k < ans_white.size() && add; ++k) {
										if (ans_white.get(k).x == new_v.x && ans_white.get(k).y == new_v.y)
											add = false;
									}
									if (add)
										ans_white.add(new_v);
								}
							}
						}
					}
				}
			}
		}
		
		
		for(int i = 0; i < 8; ++i) {
			for(int j = 0; j < 8; ++j) {
				if (board[i][j] == FIC_WHITE)
					board[i][j] = EMPTY;
			}
		}
		
		for(int i = 0; i < 8; ++i) {
			for(int j = 0; j < 8; ++j) {
				if (board[i][j] == BLACK) {
					dfs(i, j, FIC_BLACK);
				}
			}
		}
		
		ArrayList<Pair> ans_black = new ArrayList<Pair>();
		for(int x = 0; x < 8; ++x) {
			for(int y = 0; y < 8; ++y) {
				if (board[x][y] == FIC_BLACK || board[x][y] == BLACK) {
					for(int dx = -1; dx <= 1; ++dx) {
						for(int dy = -1; dy <= 1; ++dy) {
							if (x + dx < 0 || x + dx >= 8 || y + dy < 0 || y + dy >= 8) {
								continue;
							}
							if (x + 2 * dx < 0 || x + 2 * dx >= 8 || y + 2 * dy < 0 || y + 2 * dy >= 8) {
								continue;
							}
							if (board[x + dx][y + dy] == WHITE) {
								if (!(board[x + 2 * dx][y + 2 * dy] == BLACK && board[x][y] == BLACK) && 
										(board[x + 2 * dx][y + 2 * dy] == BLACK || board[x + 2 * dx][y + 2 * dy] == FIC_BLACK)) {
									Pair new_v = new Pair(x + dx, y + dy);
									boolean add = true;
									for(int k = 0; k < ans_black.size() && add; ++k) {
										if (ans_black.get(k).x == new_v.x && ans_black.get(k).y == new_v.y)
											add = false;
									}
									if (add)
										ans_black.add(new_v);
								}
							}
						}
					}
				}
			}
		}
		out.println("White: " + ans_white.size());
		for(int i = 0; i < ans_white.size(); ++i) {
			if (i != 0)
				out.print(", ");
			ans_white.get(i).print();
		}
		if (ans_white.size() != 0)
			out.println();
		out.println("Black: " + ans_black.size());
		for(int i = 0; i < ans_black.size(); ++i) {
			if (i != 0)
				out.print(", ");
			ans_black.get(i).print();
		}
		if (ans_black.size() != 0)
			out.println();
		
		
		in.close();
		out.close();
	}
	
	public void run() {
		try {
			solve("checkers");
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(89);
		}
	}

	public static void main(String[] args) {
		(new Thread(new checkers_at())).start();
	}

}