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

public class TestGen {

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;

	public String nextToken() throws IOException {
		while ((st == null) || (!st.hasMoreTokens()))
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	Random rnd;
	int tNumber;

	class Test {
		int n, k;
		int[][] a;

		void printTest() {
			try {
				if (tNumber < 10)
					out = new PrintWriter("0" + tNumber);
				else
					out = new PrintWriter("" + tNumber);
			} catch (IOException e) {
				e.printStackTrace();
			}
			tNumber++;

			out.println(n + " " + k);
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < n; j++) {
					if (a[i][j] == 1)
						out.print('w');
					else
						out.print('b');
				}
				out.println();
			}
			out.close();
		}

		void genRandomCycleTest(int n, int c, int k) {
			this.k = k;
			this.n = n;
			int[][] z = new int[c][c];
			for (int i = 0; i < c; i++) {
				for (int j = 0; j < c; j++) {
					z[i][j] = rnd.nextInt(2);
				}
			}
			a = new int[n][n];
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < n; j++) {
					a[i][j] = z[i % c][j % c];
				}
			}
		}

		void corruptTest(int count) {
			for (; count > 0; count--) {
				int t = rnd.nextInt(n * n);
				a[t / n][t % n] = 1 - a[t / n][t % n];
			}
		}

		void insertChess(int xl, int xr, int yl, int yr) {
			int fl = rnd.nextInt(2);
			for (int i = xl; i < xr; i++) {
				for (int j = yl; j < yr; j++) {
					a[i][j] = (i % 2) ^ (j % 2) ^ fl;
				}
			}
		}

		void fillColumn(int x, int c) {
			for (int j = 0; j < n; j++) {
				a[x][j] = c;
			}
		}

		void fillRow(int y, int c) {
			for (int i = 0; i < n; i++) {
				a[i][y] = c;
			}
		}

		void paintCircle(int x, int y, int r, int c) {
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < n; j++) {
					double dist = (x - i) * (x - i) + (y - j) * (y - j);
					dist = Math.sqrt(dist);
					if (dist < r)
						a[i][j] = c;
				}
			}
		}
	}

	public void solve() throws IOException {
		rnd = new Random(179);
		tNumber = 1;
		Test t = new Test();
		for (int i = 0; i < 15; i++) {
			int n = rnd.nextInt(10) + 1;
			t.genRandomCycleTest(n, 1 + rnd.nextInt(10), rnd.nextInt(n) + 1);
			if (rnd.nextBoolean()) {
				t.insertChess(rnd.nextInt(n / 2), n / 2 + rnd.nextInt(n / 2),
						rnd.nextInt(n / 2), n / 2 + rnd.nextInt(n / 2));
			}
			for (int j = 0; j < 3; j++) {
				if (rnd.nextBoolean()) {
					t.fillColumn(rnd.nextInt(n), rnd.nextInt(2));
				}
			}
			for (int j = 0; j < 3; j++) {
				if (rnd.nextBoolean()) {
					t.fillRow(rnd.nextInt(n), rnd.nextInt(2));
				}
			}
			if (n > 1) {
				for (int j = 0; j < 3; j++) {
					if (rnd.nextBoolean()) {
						t.paintCircle(rnd.nextInt(n), rnd.nextInt(n),
								rnd.nextInt(n / 2), rnd.nextInt(2));
					}
				}
			}
			t.printTest();
		}
		assert (tNumber == 16);

		for (int i = 0; i < 15; i++) {
			int n = rnd.nextInt(26) + 75;
			t.genRandomCycleTest(n, 1 + i * 6, rnd.nextInt(n) + 1);
			if (rnd.nextBoolean()) {
				t.insertChess(rnd.nextInt(n / 2), n / 2 + rnd.nextInt(n / 2),
						rnd.nextInt(n / 2), n / 2 + rnd.nextInt(n / 2));
			}
			for (int j = 0; j < 20; j++) {
				if (rnd.nextBoolean()) {
					t.fillColumn(rnd.nextInt(n), rnd.nextInt(2));
				}
			}
			for (int j = 0; j < 20; j++) {
				if (rnd.nextBoolean()) {
					t.fillRow(rnd.nextInt(n), rnd.nextInt(2));
				}
			}
			for (int j = 0; j < 5; j++) {
				if (rnd.nextBoolean()) {
					t.paintCircle(rnd.nextInt(n), rnd.nextInt(n),
							rnd.nextInt(n / 2), rnd.nextInt(2));
				}
			}
			t.printTest();
		}

		assert (tNumber == 31);

		t.genRandomCycleTest(450 + rnd.nextInt(50), rnd.nextInt(50) + 50,
				200 + rnd.nextInt(100));
		t.printTest();

		t.genRandomCycleTest(450 + rnd.nextInt(50), rnd.nextInt(50) + 50,
				200 + rnd.nextInt(100));
		t.corruptTest(1000);
		t.printTest();

		t.genRandomCycleTest(450 + rnd.nextInt(50), rnd.nextInt(50) + 50,
				200 + rnd.nextInt(100));
		t.corruptTest(10000);
		t.printTest();

		t.genRandomCycleTest(450 + rnd.nextInt(50), rnd.nextInt(50) + 50,
				200 + rnd.nextInt(100));
		t.corruptTest(1000);
		for (int i = 0; i < 30; i++) {
			t.fillColumn(rnd.nextInt(450), rnd.nextInt(2));
			t.fillRow(rnd.nextInt(450), rnd.nextInt(2));
		}
		t.printTest();

		t.genRandomCycleTest(450 + rnd.nextInt(50), rnd.nextInt(50) + 50,
				200 + rnd.nextInt(100));
		t.corruptTest(1000);
		for (int i = 0; i < 60; i++) {
			t.fillColumn(rnd.nextInt(450), rnd.nextInt(2));
			t.fillRow(rnd.nextInt(450), rnd.nextInt(2));
		}
		t.printTest();

		assert (tNumber == 36);
		System.gc();
		t.genRandomCycleTest(450 + rnd.nextInt(50), 450 + rnd.nextInt(50),
				100 + rnd.nextInt(300));
		t.printTest();

		t.genRandomCycleTest(450 + rnd.nextInt(50), 450 + rnd.nextInt(50),
				100 + rnd.nextInt(300));
		t.corruptTest(1000);
		t.printTest();

		t.genRandomCycleTest(450 + rnd.nextInt(50), 450 + rnd.nextInt(50),
				100 + rnd.nextInt(300));
		t.corruptTest(10000);
		t.printTest();

		t.genRandomCycleTest(450 + rnd.nextInt(50), 450 + rnd.nextInt(50),
				100 + rnd.nextInt(300));
		t.corruptTest(1000);
		for (int i = 0; i < 30; i++) {
			t.fillColumn(rnd.nextInt(450), rnd.nextInt(2));
			t.fillRow(rnd.nextInt(450), rnd.nextInt(2));
		}
		t.printTest();

		t.genRandomCycleTest(450 + rnd.nextInt(50), 450 + rnd.nextInt(50),
				100 + rnd.nextInt(300));
		t.corruptTest(1000);
		for (int i = 0; i < 60; i++) {
			t.fillColumn(rnd.nextInt(450), rnd.nextInt(2));
			t.fillRow(rnd.nextInt(450), rnd.nextInt(2));
		}
		t.printTest();

		assert (tNumber == 41);

		int n = 450 + rnd.nextInt(50);
		t.genRandomCycleTest(n, n, 200 + rnd.nextInt(100));
		t.insertChess(0, n, 0, n);
		t.printTest();

		n = 450 + rnd.nextInt(50);
		t.genRandomCycleTest(n, n / 5, 200 + rnd.nextInt(100));
		t.insertChess(0 + rnd.nextInt(50) + 50, n - rnd.nextInt(50) - 50,
				0 + 50 + rnd.nextInt(50), n - 50 - rnd.nextInt(50));
		t.corruptTest(1000);
		t.printTest();

		n = 450 + rnd.nextInt(50);
		t.genRandomCycleTest(n, n / 5, 200 + rnd.nextInt(100));
		t.insertChess(0 + rnd.nextInt(50) + 50, n - rnd.nextInt(50) - 50,
				0 + 50 + rnd.nextInt(50), n - 50 - rnd.nextInt(50));
		t.corruptTest(1000);
		for (int i = 0; i < 30; i++) {
			t.fillColumn(rnd.nextInt(n), rnd.nextInt(2));
			t.fillRow(rnd.nextInt(n), rnd.nextInt(2));
		}
		t.printTest();

		n = 450 + rnd.nextInt(50);
		t.genRandomCycleTest(n, n, 200 + rnd.nextInt(100));
		t.insertChess(0, n, 0, n);
		t.corruptTest(5);
		t.printTest();

		n = 450 + rnd.nextInt(50);
		t.genRandomCycleTest(n, n, 200 + rnd.nextInt(100));
		t.insertChess(0, n, 0, n);
		for (int i = 40 + rnd.nextInt(20); i < n; i += 40 + rnd.nextInt(20)) {
			for (int j = 40 + rnd.nextInt(20); j < n; j += 40 + rnd.nextInt(20)) {
				t.paintCircle(i, j, rnd.nextInt(20) + 25, rnd.nextInt(2));
			}
		}
		t.printTest();

		assert (tNumber == 46);

		n = 450 + 50;
		t.genRandomCycleTest(n, n, 250);
		t.printTest();

		n = 450 + 50;
		t.genRandomCycleTest(n, n / 5, 200 + rnd.nextInt(100));
		t.corruptTest(1000);
		t.printTest();

		n = 450 + 50;
		t.genRandomCycleTest(n, n / 5, 200 + rnd.nextInt(100));
		t.insertChess(0 + rnd.nextInt(50) + 50, n - rnd.nextInt(50) - 50,
				0 + 50 + rnd.nextInt(50), n - 50 - rnd.nextInt(50));
		t.corruptTest(1000);
		for (int i = 0; i < 30; i++) {
			t.fillColumn(rnd.nextInt(n), rnd.nextInt(2));
			t.fillRow(rnd.nextInt(n), rnd.nextInt(2));
		}
		t.printTest();

		n = 450 + 50;
		t.genRandomCycleTest(n, n, 200 + rnd.nextInt(100));
		t.corruptTest(5);
		t.printTest();

		n = 450 + 50;
		t.genRandomCycleTest(n, n, 200 + rnd.nextInt(100));
		t.insertChess(0, n, 0, n);
		for (int i = 40 + rnd.nextInt(20); i < n; i += 40 + rnd.nextInt(20)) {
			for (int j = 40 + rnd.nextInt(20); j < n; j += 40 + rnd.nextInt(20)) {
				t.paintCircle(i, j, rnd.nextInt(20) + 25, rnd.nextInt(2));
			}
		}
		t.printTest();
		assert (tNumber == 51);
	}

	public void run() {
		try {

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		new TestGen().run();
	}
}