// Generator created by Nikolay Budin

#ifdef DEBUG
#  define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include "testlib.h"
#define ff first
#define ss second
#define szof(x) ((int)x.size())
#ifndef LOCAL
#  define cerr __get_ce
#endif

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef unsigned long long ull;

using namespace __gnu_pbds;
template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename K, typename V> using ordered_map = tree<K, V, less<K>, rb_tree_tag, tree_order_statistics_node_update>;

int const INF = (int)1e9 + 1e3;
ll const INFL = (ll)1e18 + 1e6;


int main(int argc, char* argv[]) {
	registerGen(argc, argv, 1);

	int n = 1000, m = 1000;
	vector<vector<bool>> field(n, vector<bool>(m));

	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < m; ++j) {
			field[i][j] = rnd.next() < 0.5;
		}
	}

	auto fill_rect = [&](int x1, int y1, int x2, int y2, int val) {
		for (int i = x1; i <= x2; ++i) {
			for (int j = y1; j <= y2; ++j) {
				field[i][j] = val;
			}
		}
	};

	if (opt<int>(1) == 1) {
		int x = 239, y1 = 179, y2 = 837;
		fill_rect(x, y1, x, y2, 0);

		int x1 = 94, x2 = 693, y = 799;
		fill_rect(x1, y, x2, y, 0);
	} else if (opt<int>(1) == 2) {
		int x = 139, y1 = 179, y2 = 637;
		fill_rect(x, y1, x, y2, 0);

		int x1 = 94, x2 = 793, y = 419;
		fill_rect(x1, y, x2, y, 0);
	} else if (opt<int>(1) == 3) {
		int x = 239, y1 = 179, y2 = 837;
		fill_rect(x, y1, x, y2, 0);

		int x1 = 94, x2 = 693, y = 699;
		fill_rect(x1, y, x2, y, 0);

		x1 = 53, x2 = 598, y = 313;
		fill_rect(x1, y, x2, y, 0);		
	} else if (opt<int>(1) == 4) {
		int x = 339, y1 = 179, y2 = 637;
		fill_rect(x, y1, x, y2, 0);
		x = 493, y1 = 217, y2 = 715;
		fill_rect(x, y1, x, y2, 0);

		int x1 = 94, x2 = 693, y = 419;
		fill_rect(x1, y, x2, y, 0);
	}

	cout << "1\n";
	cout << n << " " << m << "\n";
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < m; ++j) {
			cout << ".#"[field[i][j]];
		}
		cout << "\n";
	}

	return 0;
}