AtCoder Regular Contest 093 - Grid Components

You are given two integers A and B.
Print a grid where each square is painted white or black that satisfies the following conditions, in the format specified in Output section:
 - Let the size of the grid be h \times w (h vertical, w horizontal). Both h and w are at most 100.
 - The set of the squares painted white is divided into exactly A connected components.
 - The set of the squares painted black is divided into exactly B connected components.
It can be proved that there always exist one or more solutions under the conditions specified in Constraints section.
If there are multiple solutions, any of them may be printed.

-----Notes-----
Two squares painted white, c_1 and c_2, are called connected when the square c_2 can be reached from the square c_1 passing only white squares by repeatedly moving up, down, left or right to an adjacent square.
A set of squares painted white, S, forms a connected component when the following conditions are met:
 - Any two squares in S are connected.
 - No pair of a square painted white that is not included in S and a square included in S is connected.
A connected component of squares painted black is defined similarly.

-----Constraints-----
 - 1 \leq A \leq 500
 - 1 \leq B \leq 500

-----Input-----
Input is given from Standard Input in the following format:
A B

-----Output-----
Output should be in the following format:
 - In the first line, print integers h and w representing the size of the grid you constructed, with a space in between.
 - Then, print h more lines. The i-th (1 \leq i \leq h) of these lines should contain a string s_i as follows:
 - If the square at the i-th row and j-th column (1 \leq j \leq w) in the grid is painted white, the j-th character in s_i should be ..
 - If the square at the i-th row and j-th column (1 \leq j \leq w) in the grid is painted black, the j-th character in s_i should be #.

-----Sample Input-----
2 3

-----Sample Output-----
3 3
##.
..#
#.#

This output corresponds to the grid below:

Difficulty: HARD

Starter code:

Solutions:
(A, B) = map(int, input().split())
(h, w) = (100, 100)
Grid = [list('#' * w) for _ in range(50)] + [list('.' * h) for _ in range(50)]
A -= 1
B -= 1
for i in range(0, 50, 2):
	for j in range(0, 100, 2):
		if A > 0:
			Grid[i][j] = '.'
			A -= 1
		else:
			break
	else:
		continue
	break
for i in range(99, 50, -2):
	for j in range(0, 100, 2):
		if B > 0:
			Grid[i][j] = '#'
			B -= 1
		else:
			break
	else:
		continue
	break
print(100, 100)
for i in range(100):
	print(''.join(Grid[i]))


(a, b) = map(int, input().split())
ans = [['#' if i < 50 else '.' for _ in range(100)] for i in range(100)]
for i in range(a - 1):
	rows = i // 50 * 2
	clms = i % 50 * 2
	ans[rows * 2][clms] = '.'
for i in range(b - 1):
	rows = i // 50 * 2
	clms = i % 50 * 2
	ans[99 - rows][clms] = '#'
print(100, 100)
for a in ans:
	print(''.join(a))


(A, B) = map(int, input().split())
MAX = 100
ans = []
for i in range(MAX):
	if i < MAX // 2:
		temp = ['.'] * MAX
	else:
		temp = ['#'] * MAX
	ans.append(temp)
A -= 1
B -= 1
h = 0
w = 0
for j in range(B):
	ans[h][w] = '#'
	w += 2
	if w > MAX - 1:
		h += 2
		w = 0
h = MAX // 2 + 1
w = 0
for j in range(A):
	ans[h][w] = '.'
	w += 2
	if w > MAX - 1:
		h += 2
		w = 0
L = [MAX, MAX]
print(*L)
for i in range(MAX):
	output = ''.join(ans[i])
	print(output)


def main():
	(A, B) = (int(i) for i in input().split())
	grid = [['#' if i < 50 else '.'] * 100 for i in range(100)]
	for h in range(49):
		if h % 2 == 1:
			continue
		for w in range(0, 100, 2):
			if A > 1:
				grid[h][w] = '.'
				A -= 1
			else:
				break
	for h in range(51, 100):
		if h % 2 == 0:
			continue
		for w in range(0, 100, 2):
			if B > 1:
				grid[h][w] = '#'
				B -= 1
			else:
				break
	print((100, 100))
	for r in grid:
		print(''.join(r))

def __starting_point():
	main()
__starting_point()


import sys
MOD = 10 ** 9 + 7
INF = 10 ** 9
PI = 3.141592653589793

def read_str():
	return sys.stdin.readline().strip()

def read_int():
	return int(sys.stdin.readline().strip())

def read_ints():
	return map(int, sys.stdin.readline().strip().split())

def read_ints2(x):
	return map(lambda num: int(num) - x, sys.stdin.readline().strip().split())

def read_str_list():
	return list(sys.stdin.readline().strip().split())

def read_int_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def GCD(a: int, b: int) -> int:
	return b if a % b == 0 else GCD(b, a % b)

def LCM(a: int, b: int) -> int:
	return a * b // GCD(a, b)

def Main():
	(a, b) = read_ints()
	print(100, 100)
	grid = [['#'] * 100 for _ in range(50)] + [['.'] * 100 for _ in range(50)]
	for i in range(~-a):
		(x, y) = divmod(i, 49)
		grid[x * 2 + 1][y * 2 + 1] = '.'
	for i in range(~-b):
		(x, y) = divmod(i, 49)
		grid[x * 2 + 51][y * 2 + 1] = '#'
	print(*[''.join(g) for g in grid], sep='\n')
Main()


(A, B) = map(int, input().split())
(h, w) = (100, 100)
grid = [['.' if j < 50 else '#' for i in range(w)] for j in range(h)]
A -= 1
B -= 1
reg = ['.' if i % 2 == 0 else '#' for i in range(w)]
for i in range(25):
	if B >= 50:
		grid[i * 2] = reg
		B -= 50
	else:
		for j in range(B):
			grid[i * 2][j * 2] = '#'
		break
for i in range(25):
	if A >= 50:
		grid[99 - i * 2] = reg
		A -= 50
	else:
		for j in range(A):
			grid[99 - i * 2][j * 2] = '.'
		break
print(h, w)
for row in grid:
	print(''.join(row))


import sys
readline = sys.stdin.readline
(A, B) = map(int, readline().split())
grid = []
for i in range(50):
	grid.append(['#'] * 100)
for i in range(50):
	grid.append(['.'] * 100)
cnt = 0
for i in range(50):
	if cnt >= A - 1:
		break
	for j in range(i % 2 * 2, len(grid[i]), 4):
		if cnt >= A - 1:
			break
		grid[i][j] = '.'
		cnt += 1
cnt = 0
for i in range(51, 100):
	if cnt >= B - 1:
		break
	for j in range(i % 2 * 2, len(grid[i]), 4):
		if cnt >= B - 1:
			break
		grid[i][j] = '#'
		cnt += 1
print(100, 100)
for g in grid:
	print(''.join(g))


(A, B) = map(int, input().split())
h = 96
w = 99
S = [['.' for _ in range(w)] for _ in range(h)]
for i in range(48, h):
	for j in range(w):
		S[i][j] = '#'
cnt = 0
while cnt < B - 1:
	for i in range(16):
		for j in range(33):
			S[3 * i + 1][3 * j + 1] = '#'
			cnt += 1
			if cnt == B - 1:
				break
		if cnt == B - 1:
			break
	if cnt == B - 1:
		break
cnt = 0
while cnt < A - 1:
	for i in range(16):
		for j in range(33):
			S[48 + 3 * i + 1][3 * j + 1] = '.'
			cnt += 1
			if cnt == A - 1:
				break
		if cnt == A - 1:
			break
	if cnt == A - 1:
		break
print(h, w)
for i in range(h):
	print(''.join(S[i]))


(A, B) = map(int, input().split())
ans = [['#'] * 100 for _ in range(50)] + [['.'] * 100 for _ in range(50)]
for i in range(0, 50, 2):
	for j in range(0, 100, 2):
		if A > 1:
			ans[i][j] = '.'
			A -= 1
for i in range(51, 100, 2):
	for j in range(0, 100, 2):
		if B > 1:
			ans[i][j] = '#'
			B -= 1
print(100, 100)
for row in ans:
	print(*row, sep='')


(A, B) = map(int, input().split())
print(100, 100)
big = max(A, B)
small = min(A, B)
ans = ['#' * 100, '.#' * 50]
b = 1
s = 1
flag = True
for i in range(98):
	if s + 50 <= small:
		ans.append(['#.', '.#'][i % 2] * 50)
		b += 50
		s += 50
	elif s < small < s + 50:
		l = small - s
		ans.append(['#.', '.#'][i % 2] * l + '..' * (50 - l))
		flag = True
		b += l
		s += l
	elif flag:
		ans.append('.' * 100)
		flag = False
	else:
		if b + 50 <= big:
			ans.append('#.' * 50)
			b += 50
		elif b < big < b + 50:
			l = big - b
			ans.append('#.' * l + '..' * (50 - l))
			b += l
		else:
			ans.append('.' * 100)
		flag = True
for i in range(100):
	if A > B:
		print(ans[i].replace('#', '_').replace('.', '#').replace('_', '.'))
	else:
		print(ans[i])


from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heapify
import sys, bisect, math, itertools, fractions
sys.setrecursionlimit(10 ** 8)
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
(a, b) = inpl()
if a == b == 1:
	print(1, 2)
	print('.#')
	return
rev = False
if a < b:
	rev = True
	(a, b) = (b, a)
a -= 1
res = [[None] * 100 for _ in range(100)]
r = 0
ok = True
while ok:
	for c in range(100):
		if r % 2:
			res[r][c] = 0
		elif not ok or c % 2:
			res[r][c] = 1
			b -= 1
			if b == 0:
				ok = False
		else:
			res[r][c] = 0
	r += 1
for c in range(100):
	res[r][c] = 1 if c == 99 else 0
r += 1
for c in range(100):
	res[r][c] = 1
r += 1
ok = True
while ok:
	for c in range(100):
		if r % 2:
			res[r][c] = 1
		elif not ok or c % 2:
			res[r][c] = 0
			a -= 1
			if a <= 0:
				ok = False
		else:
			res[r][c] = 1
	r += 1
for i in range(r, 100):
	for j in range(100):
		res[i][j] = res[i - 1][j]
print(100, 100)
for i in range(100):
	for j in range(100):
		if rev:
			res[i][j] = '.' if res[i][j] else '#'
		else:
			res[i][j] = '#' if res[i][j] else '.'
	print(''.join(res[i]))


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
in_n = lambda : int(readline())
in_nn = lambda : list(map(int, readline().split()))
in_s = lambda : readline().rstrip().decode('utf-8')
in_nl = lambda : list(map(int, readline().split()))
in_nl2 = lambda H: [in_nl() for _ in range(H)]
in_map = lambda : [s == ord('.') for s in readline() if s != ord('\n')]
in_map2 = lambda H: [in_map() for _ in range(H)]
in_all = lambda : list(map(int, read().split()))

def main():
	(A, B) = in_nn()
	grid = [[''] * 100 for _ in range(100)]
	for y in range(100):
		for x in range(100):
			if 0 <= y < 50:
				grid[y][x] = '#'
			else:
				grid[y][x] = '.'
	for y in range(49):
		for x in range(100):
			if y % 2 == 0 and x % 2 == 0:
				if A > 1:
					grid[y][x] = '.'
					A -= 1
	for y in range(51, 100):
		for x in range(100):
			if y % 2 == 1 and x % 2 == 0:
				if B > 1:
					grid[y][x] = '#'
					B -= 1
	print((100, 100))
	for y in range(100):
		print(''.join(grid[y]))

def __starting_point():
	main()
__starting_point()


(A, B) = map(int, input().split())
Aimax = (A - 1) % 50 * 2 - 1
Bimax = (B - 1) % 50 * 2 - 1
Ajmax = (A - 1) // 50
Bjmax = (B - 1) // 50
rowA1 = ['#' for _ in range(100)]
rowA2 = ['.' if i % 2 == 0 else '#' for i in range(100)]
rowA3 = ['.' if i % 2 == 0 and i <= Aimax else '#' for i in range(100)]
rowB1 = ['.' for _ in range(100)]
rowB2 = ['#' if i % 2 == 0 else '.' for i in range(100)]
rowB3 = ['#' if i % 2 == 0 and i <= Bimax else '.' for i in range(100)]
state = []
r = 0
for j in range(50):
	if j % 2 == 0 and r < Ajmax:
		state.append(rowA2)
		r += 1
	elif j % 2 == 0 and r == Ajmax:
		state.append(rowA3)
		r += 1
	else:
		state.append(rowA1)
r = 0
for j in range(50):
	if j % 2 == 1 and r < Bjmax:
		state.append(rowB2)
		r += 1
	elif j % 2 == 1 and r == Bjmax:
		state.append(rowB3)
		r += 1
	else:
		state.append(rowB1)
print(100, 100)
for s in state:
	print(''.join(s))


(a, b) = map(int, input().split())
mat = [['.'] * 50 + ['#'] * 50 for _ in range(100)]
for i in range(a - 1):
	c = 51 + 2 * (i % 24)
	d = 1 + 2 * (i // 24)
	mat[d][c] = '.'
for i in range(b - 1):
	c = 1 + 2 * (i % 24)
	d = 1 + 2 * (i // 24)
	mat[d][c] = '#'
print(100, 100)
for x in mat:
	print(*x, sep='')


(A, B) = list(map(int, input().split()))
N = 100
A -= 1
B -= 1
S = []
for i in range(N // 2):
	S.append(list('.' * N))
for i in range(50):
	S.append(list('#' * N))
flag = 0
for i in range(1, N // 2, 2):
	for j in range(1, N, 2):
		if B == 0:
			flag = 1
			break
		else:
			S[i][j] = '#'
			B -= 1
	if flag:
		break
flag = 0
for i in range(N // 2 + 1, N, 2):
	for j in range(1, N, 2):
		if A == 0:
			flag = 1
			break
		else:
			S[i][j] = '.'
			A -= 1
	if flag:
		break
print((N, N))
for i in range(N):
	print(''.join(S[i]))


import sys
input = sys.stdin.readline
import math
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache
MOD = 10 ** 9 + 7
INF = float('inf')
AZ = 'abcdefghijklmnopqrstuvwxyz'

def I():
	return int(input().strip())

def S():
	return input().strip()

def IL():
	return list(map(int, input().split()))

def SL():
	return list(map(str, input().split()))

def ILs(n):
	return list((int(input()) for _ in range(n)))

def SLs(n):
	return list((input().strip() for _ in range(n)))

def ILL(n):
	return [list(map(int, input().split())) for _ in range(n)]

def SLL(n):
	return [list(map(str, input().split())) for _ in range(n)]

def P(arg):
	print(arg)
	return

def Y():
	print('Yes')
	return

def N():
	print('No')
	return

def E():
	exit()

def PE(arg):
	print(arg)
	exit()

def YE():
	print('Yes')
	exit()

def NE():
	print('No')
	exit()

def DD(arg):
	return defaultdict(arg)

def inv(n):
	return pow(n, MOD - 2, MOD)
kaijo_memo = []

def kaijo(n):
	if len(kaijo_memo) > n:
		return kaijo_memo[n]
	if len(kaijo_memo) == 0:
		kaijo_memo.append(1)
	while len(kaijo_memo) <= n:
		kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
	return kaijo_memo[n]
gyaku_kaijo_memo = []

def gyaku_kaijo(n):
	if len(gyaku_kaijo_memo) > n:
		return gyaku_kaijo_memo[n]
	if len(gyaku_kaijo_memo) == 0:
		gyaku_kaijo_memo.append(1)
	while len(gyaku_kaijo_memo) <= n:
		gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo), MOD - 2, MOD) % MOD)
	return gyaku_kaijo_memo[n]

def nCr(n, r):
	if n == r:
		return 1
	if n < r or r < 0:
		return 0
	ret = 1
	ret = ret * kaijo(n) % MOD
	ret = ret * gyaku_kaijo(r) % MOD
	ret = ret * gyaku_kaijo(n - r) % MOD
	return ret

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr

def make_divisors(n):
	divisors = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			divisors.append(i)
			if i != n // i:
				divisors.append(n // i)
	return divisors

def make_primes(N):
	max = int(math.sqrt(N))
	seachList = [i for i in range(2, N + 1)]
	primeNum = []
	while seachList[0] <= max:
		primeNum.append(seachList[0])
		tmp = seachList[0]
		seachList = [i for i in seachList if i % tmp != 0]
	primeNum.extend(seachList)
	return primeNum

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def lcm(a, b):
	return a * b // gcd(a, b)

def count_bit(n):
	count = 0
	while n:
		n &= n - 1
		count += 1
	return count

def base_10_to_n(X, n):
	if X // n:
		return base_10_to_n(X // n, n) + [X % n]
	return [X % n]

def base_n_to_10(X, n):
	return sum((int(str(X)[-i - 1]) * n ** i for i in range(len(str(X)))))

def base_10_to_n_without_0(X, n):
	X -= 1
	if X // n:
		return base_10_to_n_without_0(X // n, n) + [X % n]
	return [X % n]

def int_log(n, a):
	count = 0
	while n >= a:
		n //= a
		count += 1
	return count
(A, B) = IL()
print(100, 100)
A = ['#'] * (25 * 50 - (A - 1)) + ['.'] * (A - 1)
B = ['#'] * (B - 1) + ['.'] * (25 * 50 - (B - 1))
for j in range(25):
	for i in range(50):
		print(A.pop(), end='')
		if i == 49:
			print('#')
		else:
			print('#', end='')
	print('#' * 100)
for j in range(25):
	print('.' * 100)
	for i in range(50):
		print(B.pop(), end='')
		if i == 49:
			print('.')
		else:
			print('.', end='')


(a, b) = map(int, input().split())
if a < b:
	ans = [['.'] * 100 for _ in range(100)]
	ichi = (a - 1) // 50
	matsu = (a - 1) % 50
	for i in range(ichi):
		if i % 2 == 0:
			for j in range(0, 100, 2):
				ans[i][j] = '#'
		else:
			for j in range(1, 100, 2):
				ans[i][j] = '#'
	if matsu == 0:
		ans[ichi] = ['#'] * 100
	elif ichi % 2 == 0:
		for j in range(0, 2 * matsu - 1, 2):
			ans[ichi][j] = '#'
		for j in range(2 * matsu, 100):
			ans[ichi][j] = '#'
		ans[ichi + 1] = ['#'] * 100
	else:
		for j in range(1, 2 * matsu, 2):
			ans[ichi][j] = '#'
		for j in range(2 * matsu, 100):
			ans[ichi][j] = '#'
		ans[ichi + 1] = ['#'] * 100
	if ichi > 0:
		used = 50 * (ichi - 1) + matsu + 1
	else:
		used = 1
	remain = b - used
	r_ichi = remain // 50
	r_matsu = remain % 50
	for i in range(r_ichi):
		for j in range(0, 100, 2):
			ans[99 - 2 * i][j] = '#'
	for j in range(0, 2 * r_matsu, 2):
		ans[99 - 2 * r_ichi][j] = '#'
else:
	ans = [['#'] * 100 for _ in range(100)]
	ichi = (b - 1) // 50
	matsu = (b - 1) % 50
	for i in range(ichi):
		if i % 2 == 0:
			for j in range(0, 100, 2):
				ans[i][j] = '.'
		else:
			for j in range(1, 100, 2):
				ans[i][j] = '.'
	if matsu == 0:
		ans[ichi] = ['.'] * 100
	elif ichi % 2 == 0:
		for j in range(0, 2 * matsu - 1, 2):
			ans[ichi][j] = '.'
		for j in range(2 * matsu, 100):
			ans[ichi][j] = '.'
		ans[ichi + 1] = ['.'] * 100
	else:
		for j in range(1, 2 * matsu, 2):
			ans[ichi][j] = '.'
		for j in range(2 * matsu, 100):
			ans[ichi][j] = '.'
		ans[ichi + 1] = ['.'] * 100
	if ichi > 0:
		used = 50 * (ichi - 1) + matsu + 1
	else:
		used = 1
	remain = a - used
	r_ichi = remain // 50
	r_matsu = remain % 50
	for i in range(r_ichi):
		for j in range(0, 100, 2):
			ans[99 - 2 * i][j] = '.'
	for j in range(0, 2 * r_matsu, 2):
		ans[99 - 2 * r_ichi][j] = '.'
print(100, 100)
print(*[''.join(ans[i]) for i in range(100)], sep='\n')


from fractions import gcd
from heapq import *
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7

def lcm(a, b):
	return a * b / fractions.gcd(a, b)

def main():
	(a, b) = map(int, input().split())
	grid = [['.' for i in range(100)] for j in range(100)]
	for i in range(50):
		for j in range(100):
			grid[i][j] = '#'
	for i in range(0, 50, 2):
		for j in range(0, 100, 2):
			if a == 1:
				break
			grid[i][j] = '.'
			a -= 1
		if a == 1:
			break
	for i in range(51, 100, 2):
		for j in range(0, 100, 2):
			if b == 1:
				break
			grid[i][j] = '#'
			b -= 1
		if b == 1:
			break
	print(100, 100)
	for i in range(100):
		print(''.join(map(str, grid[i])))
main()


(a, b) = map(int, input().split())
bd = []
for i in range(32):
	bd.append(['#' for _ in range(64)])
for i in range(32):
	bd.append(['.' for _ in range(64)])
for i in range(a - 1):
	bd[i // 32 * 2][i % 32 * 2] = '.'
for i in range(b - 1):
	bd[63 - i // 32 * 2][63 - i % 32 * 2] = '#'
print('64 64')
for i in range(64):
	print(''.join(bd[i]))


(a, b) = map(int, input().split())
grid = []
for i in range(50):
	whiteline = ['.' for k in range(100)]
	grid.append(whiteline)
for i in range(50):
	blackline = ['#' for k in range(100)]
	grid.append(blackline)
b += -1
check = 1
x = 1
y = 1
while b > 0:
	grid[y][x] = '#'
	b += -1
	if x + 2 < 50:
		x += 2
	else:
		check = check * -1
		if check == 1:
			x = 2
		else:
			x = 1
		y += 2
a += -1
check = 1
x = 1
y = 55
while a > 0:
	grid[y][x] = '.'
	a += -1
	if x + 2 < 50:
		x += 2
	else:
		check = check * -1
		if check == 1:
			x = 2
		else:
			x = 1
		y += 2
print(100, 100)
for i in range(100):
	for k in range(100):
		if k != 99:
			print(grid[i][k], end='')
		else:
			print(grid[i][k])


def inpl():
	return list(map(int, input().split()))
(A, B) = inpl()
L = [['.'] * 50 for i in range(100)]
R = [['#'] * 50 for i in range(100)]

def plot(R):
	print('\n'.join([''.join(r) for r in R]))
count = 0
for i in range(11):
	for j in range(48):
		if count == B - 1:
			break
		L[j + 3 * i + 1][j + 1] = '#'
		count += 1
count = 0
for i in range(11):
	for j in range(48):
		if count == A - 1:
			break
		R[j + 3 * i + 1][j + 1] = '.'
		count += 1
ANS = [l + r for (l, r) in zip(L, R)]
print(100, 100)
plot(ANS)


def printrow(num, s, t):
	for i in range(50):
		for j in range(100):
			res = ((i + j) % 3 == 0) & ((num - 1) * i > 0)
			print(s if res else t, end='')
			num -= res
		print()
(a, b) = map(int, input().split())
print(100, 100)
printrow(b, '#', '.')
printrow(a, '.', '#')


(a, b) = map(int, input().split())
(cntA, cntB) = (0, 0)
print(100, 100)
flag = False
if a >= b:
	arr = [['#'] * 100 for i in range(100)]
	l = []
	cntB = 1
	for i in range(2, 99, 4):
		if flag:
			break
		for j in range(2, 99, 4):
			l.append((i, j))
			for y in range(i - 1, i + 2):
				for x in range(j - 1, j + 2):
					arr[y][x] = '.'
			cntA += 1
			if cntA == a:
				flag = True
				break
	while cntB < b:
		cntB += 1
		(s, t) = l.pop()
		arr[s][t] = '#'
	for i in range(100):
		print(''.join(arr[i]))
else:
	arr = [['.'] * 100 for i in range(100)]
	l = []
	cntA = 1
	for i in range(2, 99, 4):
		if flag:
			break
		for j in range(2, 99, 4):
			l.append((i, j))
			for y in range(i - 1, i + 2):
				for x in range(j - 1, j + 2):
					arr[y][x] = '#'
			cntB += 1
			if cntB == b:
				flag = True
				break
	while cntA < a:
		cntA += 1
		(s, t) = l.pop()
		arr[s][t] = '.'
	for i in range(100):
		print(''.join(arr[i]))


import sys
sys.setrecursionlimit(10 ** 8)
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
(A, B) = map(int, readline().split())

def solve():
	W = 100
	hw = B // 25 + 2
	hb = A // 25 + 2
	H = hw + hb
	grid = [[i >= hw] * W for i in range(H)]

	def paint_black():
		black = 1
		for r in range(0, hw - 1, 2):
			for c in range(0, W, 2):
				if black == B:
					return
				grid[r][c] = True
				black += 1

	def paint_white():
		white = 1
		for r in range(hw + 1, H, 2):
			for c in range(0, W, 2):
				if white == A:
					return
				grid[r][c] = False
				white += 1
	paint_black()
	paint_white()
	return grid

def print_grid(grid):
	(h, w) = (len(grid), len(grid[0]))
	print(h, w)
	for r in range(h):
		for c in range(w):
			if grid[r][c]:
				print('#', end='')
			else:
				print('.', end='')
		print()

def __starting_point():
	print_grid(solve())
__starting_point()


(A, B) = map(int, input().split())
if A == 1:
	C = [['.' for _ in range(100)] for _ in range(100)]
	cnt = 0
	flag = 0
	for i in range(0, 100, 2):
		for j in range(0, 100, 2):
			C[i][j] = '#'
			cnt += 1
			if cnt == B:
				flag = 1
				break
		if flag == 1:
			break
elif B == 1:
	C = [['#' for _ in range(100)] for _ in range(100)]
	cnt = 0
	flag = 0
	for i in range(0, 100, 2):
		for j in range(0, 100, 2):
			C[i][j] = '.'
			cnt += 1
			if cnt == A:
				flag = 1
				break
		if flag == 1:
			break
else:
	C = [['.' for _ in range(100)] for _ in range(100)]
	for i in range(50, 100):
		for j in range(100):
			C[i][j] = '#'
	for i in range(1, 49):
		for j in range(1, 99):
			C[i][j] = '#'
	cnt = 0
	flag = 0
	for i in range(2, 47, 2):
		for j in range(2, 97, 2):
			if cnt == A - 2:
				flag = 1
				break
			C[i][j] = '.'
			cnt += 1
		if flag == 1:
			break
	for i in range(51, 99):
		for j in range(1, 99):
			C[i][j] = '.'
	cnt = 0
	flag = 0
	for i in range(52, 97, 2):
		for j in range(2, 97, 2):
			if cnt == B - 2:
				flag = 1
				break
			C[i][j] = '#'
			cnt += 1
		if flag == 1:
			break
print(100, 100)
for i in range(100):
	print(''.join(C[i]))


(w, b) = map(int, input().split())
w -= 1
b -= 1
black_base = [['#'] * 100 for _ in range(50)]
white_base = [['.'] * 100 for _ in range(50)]
for i in range(25):
	for j in range(25):
		if not w:
			break
		black_base[2 * i][j * 2] = '.'
		w -= 1
	else:
		continue
	break
for i in range(25):
	for j in range(25):
		if not b:
			break
		white_base[2 * i + 1][2 * j] = '#'
		b -= 1
	else:
		continue
	break
print(100, 100)
print('\n'.join(map(''.join, black_base + white_base)))


(a, b) = map(int, input().split())
L = [['#'] * 100 for _ in range(50)] + [['.'] * 100 for _ in range(50)]
(qa, ra) = divmod(a - 1, 50)
for i in range(qa):
	L[i * 2] = ['#' if j % 2 else '.' for j in range(100)]
L[qa * 2] = ['#' if j % 2 else '.' for j in range(ra * 2)] + ['#'] * (100 - ra * 2)
(qb, rb) = divmod(b - 1, 50)
for i in range(qb):
	L[51 + i * 2] = ['.' if j % 2 else '#' for j in range(100)]
L[51 + qb * 2] = ['.' if j % 2 else '#' for j in range(rb * 2)] + ['.'] * (100 - rb * 2)
print(100, 100)
for l in L:
	print(*l, sep='')


from math import gcd
from math import factorial as f
from math import ceil, floor, sqrt
import math
import bisect
import re
import heapq
from copy import deepcopy
import itertools
from itertools import permutations
from sys import exit
ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(map(int, input().split()))
yes = 'Yes'
no = 'No'

def main():
	(a, b) = mi()
	print(100, 100)
	ans = [[] for i in range(100)]
	for i in range(50):
		for j in range(100):
			ans[i].append('#')
	for i in range(50, 100):
		for j in range(100):
			ans[i].append('.')
	for i in range(a - 1):
		ans[2 * (i // 50)][2 * (i % 50)] = '.'
	for i in range(b - 1):
		ans[99 - 2 * (i // 50)][2 * (i % 50)] = '#'
	for i in range(100):
		print(''.join(ans[i]))
main()


(A, B) = map(int, input().split())
Acount = 1
Bcount = 1
print(100, 100)
for j in range(49):
	OUTPUT = ''
	for i in range(100):
		if i % 2 == 0 and j % 2 == 0 and (Acount < A):
			Acount += 1
			OUTPUT += '.'
		else:
			OUTPUT += '#'
	print(OUTPUT)
print(''.join(['#' for i in range(100)]))
B_OUTPUT = []
for j in range(49):
	OUTPUT = ''
	for i in range(100):
		if i % 2 == 0 and j % 2 == 0 and (Bcount < B):
			Bcount += 1
			OUTPUT += '#'
		else:
			OUTPUT += '.'
	B_OUTPUT.append(OUTPUT)
B_OUTPUT.append(''.join(['.' for i in range(100)]))
for b in B_OUTPUT[::-1]:
	print(b)


def main():
	(white, black) = [int(e) for e in input().split()]
	w = 100
	h = 50
	line = [0] * w
	field = [list(line) for _ in range(h)]
	white -= 1
	if white > 0:
		black -= 1
		for y in range(0, h, 2):
			for x in range(0, w, 2):
				field[y][x + 1] = field[y + 1][x] = field[y + 1][x + 1] = 1
				white -= 1
				if white == 0:
					break
			if white == 0:
				break
	if black > 0:
		for y in range(24, h, 2):
			for x in range(0, w, 2):
				field[y][x] = 1
				black -= 1
				if black == 0:
					break
			if black == 0:
				break
	print('{} {}'.format(h, w))
	for line in field:
		print(''.join(['#' if c else '.' for c in line]))
main()


(A, B) = list(map(int, input().split()))
N = 100
n = N // 2
grid = [['#'] * N for _ in range(N)]
for i in range(n, N):
	for j in range(N):
		grid[i][j] = '.'
A -= 1
B -= 1
for i in range(0, A // n * 2, 2):
	for j in range(0, N, 2):
		grid[i][j] = '.'
for j in range(0, A % n * 2, 2):
	grid[A // n * 2][j] = '.'
grid = grid[::-1]
for i in range(0, B // n * 2, 2):
	for j in range(0, N, 2):
		grid[i][j] = '#'
for j in range(0, B % n * 2, 2):
	grid[B // n * 2][j] = '#'
print(' '.join([str(N), str(N)]))
for i in range(N):
	print(''.join(grid[i]))


(A, B) = list(map(int, input().split()))
ans = [['#'] * 100 for _ in range(50)] + [['.'] * 100 for _ in range(50)]
A -= 1
B -= 1
for h in range(0, 50, 2):
	for w in range(0, 100, 2):
		if A == 0:
			break
		ans[h][w] = '.'
		A -= 1
for h in range(0, 50, 2):
	for w in range(0, 100, 2):
		if B == 0:
			break
		ans[-(h + 1)][w] = '#'
		B -= 1
print((100, 100))
for a in ans:
	print(''.join(a))


(a, b) = map(int, input().split())
k = 50
W = [['.'] * (k * 2) for i in range(k)]
B = [['#'] * (k * 2) for i in range(k)]
for i in range(b - 1):
	h = i // k * 2
	w = i % k * 2
	W[h][w] = '#'
for i in range(a - 1):
	h = i // k * 2 + 1
	w = i % k * 2 + 1
	B[-h][-w] = '.'
ans = [''.join(W[i]) for i in range(k)] + [''.join(B[i]) for i in range(k)]
print(100, 100)
print('\n'.join(ans))


(white, black) = map(int, input().split())
white -= 1
black -= 1
grid = [['#' for i in range(100)] for j in range(100)]
for i in range(1, 99):
	for j in range(50, 99):
		grid[i][j] = '.'
a = 3
b = 3
while True:
	if white == 0:
		break
	grid[a][b] = '.'
	white -= 1
	a += 2
	if a > 93:
		a = 3
		b += 2
c = 3
d = 53
while True:
	if black == 0:
		break
	grid[c][d] = '#'
	black -= 1
	c += 2
	if c > 93:
		c = 3
		d += 2
print(100, 100)
for i in grid:
	print(''.join(i))


(A, B) = map(int, input().split())
S = [['.' if h < 50 else '#' for _ in range(100)] for h in range(100)]
end_black = False
for i in range(0, 50, 2):
	if end_black:
		break
	for j in range(100):
		if B <= 1:
			end_black = True
			break
		if j % 2 == 0:
			S[i][j] = '#'
			B -= 1
end_white = False
for i in range(53, 100, 2):
	if end_white:
		break
	for j in range(100):
		if A <= 1:
			end_white = True
			break
		if j % 2 == 0:
			S[i][j] = '.'
			A -= 1
print(100, 100)
for i in range(100):
	print(''.join(S[i]))


import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate

def read_ints():
	return list(map(int, read().split()))

def read_a_int():
	return int(read())

def read_tuple(H):
	ret = []
	for _ in range(H):
		ret.append(tuple(map(int, read().split())))
	return ret

def read_col(H):
	ret = []
	for _ in range(H):
		ret.append(list(map(int, read().split())))
	return tuple(map(list, zip(*ret)))

def read_matrix(H):
	ret = []
	for _ in range(H):
		ret.append(list(map(int, read().split())))
	return ret
MOD = 10 ** 9 + 7
INF = 2 ** 31
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right
(A, B) = read_ints()
A -= 1
B -= 1
print(100, 100)
for _ in range(25):
	for _ in range(50):
		if A > 0:
			print('#.', end='')
			A -= 1
		else:
			print('##', end='')
	print()
	print('#' * 100)
for _ in range(25):
	print('.' * 100)
	for _ in range(50):
		if B > 0:
			print('#.', end='')
			B -= 1
		else:
			print('..', end='')
	print()


(A, B) = map(int, input().split())
grid = []
for _ in range(50):
	grid.append(['#'] * 100)
for _ in range(50):
	grid.append(['.'] * 100)
(div, mod) = divmod(A - 1, 50)
for d in range(div):
	h = 0 + d * 2
	for w in range(0, 100, 2):
		grid[h][w] = '.'
if mod:
	h = 0 + div * 2
	for w in range(0, mod * 2, 2):
		grid[h][w] = '.'
(div, mod) = divmod(B - 1, 50)
for d in range(div):
	h = 51 + d * 2
	for w in range(0, 100, 2):
		grid[h][w] = '#'
if mod:
	h = 51 + div * 2
	for w in range(0, mod * 2, 2):
		grid[h][w] = '#'
print(100, 100)
for g in grid:
	print(''.join(g))


(A, B) = list(map(int, input().split()))
z = (['#'] * 100 + ['\n']) * 50
for a in range(A - 1):
	j = a % 50
	z[j * 2 + a // 50 % 2 + 202 * (a // 50)] = '.'
z2 = (['.'] * 100 + ['\n']) * 50
for a in range(B - 1):
	j = a % 50
	z2[j * 2 + a // 50 % 2 + 101 + 202 * (a // 50)] = '#'
print((100, 100))
print(''.join(z) + ''.join(z2))


(a, b) = map(int, input().split())
w = 100
grid = []
grid.append('.' * w)
a -= 1
while b > 1:
	x = min(w // 2, b - 1)
	b -= x
	grid.append('#.' * x + '.' * (w - x * 2))
	grid.append('.' * w)
grid.append('#' * w)
b -= 1
while a > 0:
	x = min(w // 2, a)
	a -= x
	grid.append('#.' * x + '#' * (w - x * 2))
	grid.append('#' * w)
print(len(grid), w)
for row in grid:
	print(row)


(A, B) = map(int, input().split())
print(100, 100)
resmap = [['.'] * 100 for _ in range(100)]
for i in range(A - 1):
	from_btm = i // 50 * 2
	from_lft = i % 50 * 2
	resmap[99 - from_btm][from_lft] = '.'
	resmap[99 - from_btm][from_lft + 1] = '#'
	resmap[99 - from_btm - 1][from_lft] = '#'
	resmap[99 - from_btm - 1][from_lft + 1] = '#'
for i in range(B - 1 + (A == 1)):
	from_top = i // 50 * 2
	from_lft = i % 50 * 2
	resmap[from_top][from_lft] = '#'
for line in resmap:
	print(*line, sep='')


import sys
sys.setrecursionlimit(10 ** 8)
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
(A, B) = map(int, readline().split())
color_flipped = False
if A < B:
	(A, B) = (B, A)
	color_flipped = True

def solve():
	hb = min(B, 12)
	h = (hb * 2 + 1) * 3
	w = 100
	grid = [[True] * w for _ in range(h)]
	black = 1
	white = 0
	for i in range(hb):
		if black == B:
			break
		black += 1
		white += 1
		for c in range(w):
			for j in range(3):
				grid[6 * i + j + 3][c] = False

	def paint_white(i):
		nonlocal white
		for c in range(0, w, 2):
			if white == A:
				return
			grid[6 * i + 1][c] = False
			white += 1

	def paint_black(i):
		nonlocal black
		for c in range(0, w, 2):
			if black == B:
				return
			grid[6 * i + 4][c] = True
			black += 1
	for i in range(hb):
		paint_white(i)
		paint_black(i)
	assert black == B
	while white < A:
		grid.append([True] * w)
		grid.append([True] * w)
		for c in range(0, w, 2):
			if white == A:
				break
			white += 1
			grid[-1][c] = False
	return grid

def print_grid(grid):
	(h, w) = (len(grid), len(grid[0]))
	print(h, w)
	for r in range(h):
		for c in range(w):
			if grid[r][c] ^ color_flipped:
				print('#', end='')
			else:
				print('.', end='')
		print()

def __starting_point():
	print_grid(solve())
__starting_point()


(a, b) = map(int, input().split())
(h, w) = (99, 99)
g = [['.' for _ in range(w)] for _ in range(h)]
white = 1
black = 0
for i in range(0, h, 3):
	for j in range(0, w, 3):
		if black < b:
			g[i + 1][j + 1] = '#'
			black += 1
if a > 1:
	g[1][1] = '.'
for i in reversed(range(0, h, 3)):
	for j in reversed(range(0, w, 3)):
		if white < a:
			for k in range(3):
				for l in range(3):
					g[i + k][j + l] = '#'
			g[i + 1][j + 1] = '.'
			white += 1
print(h, w)
for i in range(h):
	print(''.join(g[i]))


(w, b) = map(int, input().split())
(A, B, C, D) = (['##'], ['..'], ['#.'], ['.#'])
w -= 1
b -= 1
print(100, 50)
for i in range(100):
	if i < 50:
		if i % 2 == 1:
			print(*A * 25, sep='')
		elif w >= 25 and i % 2 == 0:
			print(*C * 25, sep='')
			w -= 25
		else:
			E = C * w + A * (25 - w)
			print(*E, sep='')
			w = 0
	elif i % 2 == 0:
		print(*B * 25, sep='')
	elif b >= 25 and i % 2 == 1:
		print(*D * 25, sep='')
		b -= 25
	else:
		F = D * b + B * (25 - b)
		print(*F, sep='')
		b = 0


import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7

def resolve():
	(a, b) = list(map(int, input().split()))
	res = [[''] * 100 for _ in range(100)]
	for i in range(100):
		for j in range(100):
			res[i][j] = '.' if i < 50 else '#'
	b -= 1
	for i in range(0, 50, 2):
		for j in range(0, 100, 2):
			if b == 0:
				break
			res[i][j] = '#'
			b -= 1
		else:
			continue
		break
	a -= 1
	for i in reversed(list(range(50, 100, 2))):
		for j in range(0, 100, 2):
			if a == 0:
				break
			res[i][j] = '.'
			a -= 1
		else:
			continue
		break
	print((100, 100))
	for i in res:
		print(''.join(i))

def __starting_point():
	resolve()
__starting_point()


(A, B) = map(int, input().split())
res_list = [['.'] * 100 for _ in range(20)] + [['#'] * 100 for _ in range(20)]
A -= 1
B -= 1
for i in range(0, 20, 2):
	for j in range(0, 100, 2):
		if B > 0:
			res_list[i][j] = '#'
			B -= 1
for i in range(21, 40, 2):
	for j in range(0, 100, 2):
		if A > 0:
			res_list[i][j] = '.'
			A -= 1
print('40 100')
for res in res_list:
	print(''.join(res))


(A, B) = map(int, input().split())
n = 50
m = n * 2
grid = []
for i in range(n):
	grid.append(['.'] * m)
for i in range(n):
	grid.append(['#'] * m)
x = 0
y = 0
for i in range(B - 1):
	grid[y][x] = '#'
	x += 2
	if x >= m:
		x -= m
		y += 2
x = 0
y = n + 1
for i in range(A - 1):
	grid[y][x] = '.'
	x += 2
	if x >= m:
		x -= m
		y += 2
print(str(m) + ' ' + str(m))
for row in grid:
	print(''.join(row))


(A, B) = map(int, input().split())
mat = []
for i in range(100):
	array = ['.'] * 20 + ['#'] * 20
	mat.append(array)
for i in range(B - 1):
	j = 2 * (i // 10)
	k = 2 * (i % 10)
	mat[j][k] = '#'
for i in range(A - 1):
	j = 2 * (i // 10)
	k = 2 * (i % 10) + 21
	mat[j][k] = '.'
print(100, 40)
for i in range(100):
	print(''.join(mat[i]))


(A, B) = list(map(int, input().split()))
h = w = 100
ans = [['' for _ in range(w)] for __ in range(h)]
for i in range(h // 2):
	for j in range(w):
		if i & 1 and j & 1 and (A - 1 > 0):
			ans[i][j] = '.'
			A -= 1
		else:
			ans[i][j] = '#'
for i in range(h - 1, h // 2 - 1, -1):
	for j in range(w):
		if i & 1 and j & 1 and (B - 1 > 0):
			ans[i][j] = '#'
			B -= 1
		else:
			ans[i][j] = '.'
print((h, w))
for r in ans:
	print(''.join(r))


line = input().split(' ')
a = max(int(line[0]) - 1, 0)
b = max(int(line[1]) - 1, 0)
h = 100
w = 100
m = []
for hi in range(h):
	if hi < 50:
		m.append(['#' for _ in range(w)])
	else:
		m.append(['.' for _ in range(w)])
for ai in range(a // 50):
	for i in range(50):
		m[2 * ai][2 * i] = '.'
for ai in range(a % 50):
	m[2 * (a // 50)][2 * ai] = '.'
for bi in range(b // 50):
	for i in range(50):
		m[50 + 2 * bi + 1][2 * i] = '#'
for bi in range(b % 50):
	m[50 + 2 * (b // 50) + 1][2 * bi] = '#'
print(str(h) + ' ' + str(w))
for hi in range(h):
	print(''.join(m[hi]))


ab = list(map(int, input().split()))
g = [['#'] * 100 for _ in range(50)] + [['.'] * 100 for _ in range(50)]
for k in range(2):
	cnt = 0
	flag = False
	c = '.' if k == 0 else '#'
	for i in range(51 * k, 50 * (k + 1), 2):
		for j in range(0, 100, 2):
			if cnt == ab[k] - 1:
				flag = True
				break
			g[i][j] = c
			cnt += 1
		if flag:
			break
print((100, 100))
for i in g:
	print(''.join(i))


(a, b) = map(int, input().split())
print(100, 100)

def hoge(n, w='.', b='#'):
	for i in range(50):
		if i % 2 == 0:
			print(b * 100)
		else:
			l = [b] * 100
			for j in range(min(25, n)):
				l[j * 2] = w
			n -= min(25, n)
			print(''.join(l))
hoge(a - 1)
hoge(b - 1, '#', '.')


def inpl():
	return [int(i) for i in input().split()]
(A, B) = inpl()

def nextin(nwin):
	(nx, ny) = nwin
	if nx != 98:
		return (nx + 2, ny)
	else:
		return (0, ny + 2)
Wh = [['#' for _ in range(100)] for _ in range(50)]
nowin = [0, 0]
for _ in range(A - 1):
	(ix, iy) = nowin
	Wh[iy][ix] = '.'
	nowin = nextin(nowin)
Bl = [['.' for _ in range(100)] for _ in range(50)]
nowin = [0, 1]
for _ in range(B - 1):
	(ix, iy) = nowin
	Bl[iy][ix] = '#'
	nowin = nextin(nowin)
print('100', '100')
for i in range(50):
	print(''.join(Wh[i]))
for j in range(50):
	print(''.join(Bl[j]))


print('97 97')
(A, B) = map(int, input().split())
if A > B:
	char = ['.', '#']
	M = A
	m = B
else:
	char = ['#', '.']
	M = B
	m = A
for i in range(1, 98):
	str = ''
	for j in range(1, 98):
		if i % 4 == 1 or j % 4 == 1:
			str += char[1]
		elif M < (i - 1) // 4 * 24 + (j - 1) // 4 + 1:
			str += char[1]
		elif i % 4 == j % 4 == 3 and m > (i - 1) // 4 * 24 + (j - 1) // 4 + 1:
			str += char[1]
		else:
			str += char[0]
	print(str)


(B, A) = map(int, input().split())
H = W = 100
ans = [['.#'[i // 50]] * W for i in range(H)]
A -= 1
B -= 1
for i in range(10):
	k = min(A, 50)
	A -= k
	for j in range(k):
		ans[i * 2][j * 2] = '#'
	if A == 0:
		break
for i in range(10):
	k = min(B, 50)
	B -= k
	for j in range(k):
		ans[51 + i * 2][j * 2] = '.'
	if B == 0:
		break
print(H, W)
for row in ans:
	print(''.join(row))


def prity(mat, line):
	print(line, 100)
	for i in range(line):
		for j in range(100):
			print(mat[i][j], end='')
		print()
(A, B) = map(int, input().split())
if A * B == 1:
	print(1, 2)
	print('.#')
else:
	mat = [['' for i in range(100)] for j in range(100)]
	line = 0
	if A > 1:
		B -= 1
		while A > 1:
			for j in range(50):
				if A > 1:
					mat[line][2 * j] = '.'
					A -= 1
				else:
					mat[line][2 * j] = '#'
				mat[line][2 * j + 1] = '#'
			for j in range(100):
				mat[line + 1][j] = '#'
			line += 2
	for j in range(100):
		mat[line][j] = '.'
	A -= 1
	line += 1
	assert A == 0
	if B > 0:
		while B > 0:
			for j in range(50):
				if B > 0:
					mat[line][2 * j] = '#'
					B -= 1
				else:
					mat[line][2 * j] = '.'
				mat[line][2 * j + 1] = '.'
			for j in range(100):
				mat[line + 1][j] = '.'
			line += 2
	prity(mat, line)


def makelist(n, m):
	return [['.' for _ in range(m)] for _ in range(n)]
(a, b) = map(int, input().split())
N = 100
h = N // 2
d = makelist(N, N)
for y in range(h):
	for x in range(N):
		d[y][x] = '#'
(a, b) = (a - 1, b - 1)
for y in range(h):
	for x in range(N):
		if a == 0:
			break
		if y % 2 == 0 and x % 2 == 0:
			a -= 1
			d[y][x] = '.'
for y in reversed(range(h, N)):
	for x in range(N):
		if b == 0:
			break
		if y % 2 == 1 and x % 2 == 1:
			b -= 1
			d[y][x] = '#'
print(N, N)
for y in range(N):
	print(''.join(d[y]))


inf = float('inf')
mod = 10 ** 9 + 7

def solve(A, B):
	ans = [['#' for _ in range(101)] for _ in range(101)]
	B -= 1
	for i in range(1, 101, 4):
		for j in range(1, 101, 4):
			if A + B == 0:
				break
			if A > 0 and B > 0:
				ans[i][j] = '.'
				ans[i][j + 1] = '.'
				ans[i][j + 2] = '.'
				ans[i + 1][j] = '.'
				ans[i + 1][j + 2] = '.'
				ans[i + 2][j] = '.'
				ans[i + 2][j + 1] = '.'
				ans[i + 2][j + 2] = '.'
				A -= 1
				B -= 1
			elif A > 0:
				ans[i][j] = '.'
				A -= 1
			elif B > 0:
				if j == 1:
					ans[i - 1][j] = '.'
					ans[i - 1][j + 1] = '.'
					ans[i - 1][j + 2] = '.'
				ans[i][j - 1] = '.'
				ans[i + 1][j - 1] = '.'
				ans[i + 2][j - 1] = '.'
				ans[i][j] = '.'
				ans[i][j + 1] = '.'
				ans[i][j + 2] = '.'
				ans[i + 1][j] = '.'
				ans[i + 1][j + 2] = '.'
				ans[i + 2][j] = '.'
				ans[i + 2][j + 1] = '.'
				ans[i + 2][j + 2] = '.'
				B -= 1
		if A + B == 0:
			break
	print((100, 100))
	for anss in ans[1:]:
		print(''.join(anss[1:]))

def __starting_point():
	(A, B) = list(map(int, input().split()))
	solve(A, B)
__starting_point()


(A, B) = list(map(int, input().split()))
white = [['.'] * 100 for _ in range(50)]
black = [['#'] * 100 for _ in range(50)]
flag = True
if B != 1:
	for h in range(0, 50, 2):
		if flag:
			for w in range(0, 100, 2):
				white[h][w] = '#'
				B -= 1
				if B == 1:
					flag = False
				if flag == False:
					break
		if flag == False:
			break
flag = True
if A != 1:
	for h in range(1, 50, 2):
		if flag:
			for w in range(0, 100, 2):
				black[h][w] = '.'
				A -= 1
				if A == 1:
					flag = False
				if flag == False:
					break
		if flag == False:
			break
print((100, 100))
for w in white:
	print(''.join(w))
for b in black:
	print(''.join(b))


ma = lambda : map(int, input().split())
lma = lambda : list(map(int, input().split()))
tma = lambda : tuple(map(int, input().split()))
ni = lambda : int(input())
yn = lambda fl: print('Yes') if fl else print('No')
import collections
import math
import itertools
import heapq as hq
ceil = math.ceil
(a, b) = ma()
wh = '.'
bl = '#'
if a > b:
	(a, b) = (b, a)
	(wh, bl) = (bl, wh)
area = [[wh] * 100 for i in range(100)]

def cycle(y, x, f=True):
	for i in range(y, y + 3):
		for j in range(x, x + 3):
			area[i][j] = bl
	if f:
		area[y + 1][x + 1] = wh

def solve():
	cnt = 0
	iy = 0
	ix = 0
	while cnt < b:
		if cnt + 1 < a:
			cycle(iy, ix)
		else:
			cycle(iy, ix, f=False)
		ix += 4
		if ix >= 95:
			ix = 0
			iy += 4
		cnt += 1
solve()
print(100, 100)
for ar in area:
	print(''.join(ar))


def main():
	(A, B) = map(int, input().split())
	grid = []
	for _ in range(50):
		grid.append(['#' for _ in range(100)])
	for _ in range(50):
		grid.append(['.' for _ in range(100)])
	count1 = 0
	for i in range(0, 50, 3):
		for j in range(0, 100, 3):
			if count1 < A - 1:
				grid[i][j] = '.'
				count1 += 1
			if count1 == A - 1:
				break
	count2 = 0
	for i in range(51, 100, 3):
		for j in range(0, 100, 3):
			if count2 < B - 1:
				grid[i][j] = '#'
				count2 += 1
			if count2 == B - 1:
				break
	print('100 100')
	for i in range(100):
		print(''.join(grid[i]))
main()


def examA():
	C = [SI() for _ in range(3)]
	ans = C[0][0] + C[1][1] + C[2][2]
	print(ans)
	return

def examB():
	(N, M) = LI()
	P = [0] * N
	S = [LSI() for _ in range(M)]
	pena = 0
	ac = set()
	for (p, s) in S:
		p = int(p) - 1
		if s == 'WA':
			P[p] += 1
		else:
			if p in ac:
				continue
			ac.add(p)
			pena += P[p]
	print(len(ac), pena)
	return

def examC():
	(W, H, N) = LI()
	(lx, rx, ly, ry) = (0, W, 0, H)
	A = [LI() for _ in range(N)]
	for (x, y, a) in A:
		if a == 1:
			lx = max(lx, x)
		elif a == 2:
			rx = min(rx, x)
		elif a == 3:
			ly = max(ly, y)
		elif a == 4:
			ry = min(ry, y)
	ans = max(0, rx - lx) * max(0, ry - ly)
	print(ans)
	return

def examD():
	(N, H) = LI()
	B = [0] * N
	maxa = 0
	ans = 0
	for i in range(N):
		(a, B[i]) = LI()
		if a > maxa:
			maxa = a
	B.sort(reverse=True)
	for b in B:
		if b < maxa:
			break
		H -= b
		ans += 1
		if H <= 0:
			print(ans)
			return
	ans += -(-H // maxa)
	print(ans)
	return

def examE():
	(A, B) = LI()
	ans = [['#'] * 100 for _ in range(50)] + [['.'] * 100 for _ in range(50)]
	i = 0
	j = 0
	for _ in range(A - 1):
		ans[i][j] = '.'
		j += 2
		if j >= 100:
			j = 0
			i += 2
	i = 0
	j = 0
	for _ in range(B - 1):
		ans[99 - i][j] = '#'
		j += 2
		if j >= 100:
			j = 0
			i += 2
	print(100, 100)
	for v in ans:
		print(''.join(map(str, v)))
	return

def examF():
	ans = 0
	print(ans)
	return
import sys, bisect, itertools, heapq, math, random
from copy import deepcopy
from heapq import heappop, heappush, heapify
from collections import Counter, defaultdict, deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def I():
	return int(readline())

def LI():
	return list(map(int, readline().split()))

def LSI():
	return list(map(str, sys.stdin.readline().split()))

def LS():
	return sys.stdin.readline().split()

def SI():
	return sys.stdin.readline().strip()
nonlocal mod, mod2, inf, alphabet, _ep
mod = 10 ** 9 + 7
mod2 = 998244353
inf = 10 ** 18
_ep = 10 ** (-12)
alphabet = [chr(ord('a') + i) for i in range(26)]
sys.setrecursionlimit(10 ** 7)

def __starting_point():
	examE()
__starting_point()


(a, b) = list(map(int, input().split()))
print('100 100')
flip = a > b
if flip:
	(a, b) = (b, a)
f = [['#' for _ in range(100)] for __ in range(100)]
(i, j) = (0, 0)
for _ in range(b - 1):
	f[i][j + 1] = '.'
	f[i + 1][j + 1] = '.'
	f[i + 1][j] = '.'
	j += 2
	if j > 98:
		j = 0
		i += 2
(i, j) = (99, 0)
if b == 1:
	a += 1
for _ in range(a - 1):
	f[i][j] = '.'
	j += 2
	if j > 98:
		j = 0
		i -= 2
if flip:
	for i in range(100):
		f[i] = list(['.' if x == '#' else '#' for x in f[i]])
for row in f:
	print(''.join(row))


import sys
input = sys.stdin.readline
(A, B) = map(int, input().split())
a = [['#'] * 100 for _ in range(100)]
for i in range(100):
	a[i][0] = '.'
for i in range(0, 100, 2):
	for j in range(1, 99):
		a[i][j] = '.'
for i in range(0, 100, 2):
	for j in range(1, 99, 2):
		if A <= 1:
			break
		A -= 1
		a[i][j] = '#'
for i in range(99, -1, -2):
	for j in range(98, 0, -2):
		if B <= 1:
			break
		B -= 1
		a[i][j] = '.'
print(100, 100)
for r in a:
	print(''.join(r))


(a, b) = map(int, input().split())
a -= 1
b -= 1
ans = [['#' for _ in range(90)] for _ in range(40)] + [['.' for _ in range(90)] for _ in range(40)]
pos = 0
for i in range(a):
	x = pos % 90
	y = pos // 90 * 2
	ans[y][x] = '.'
	pos += 2
pos = 0
for j in range(b):
	x = pos % 90
	y = 45 + pos // 90 * 2
	ans[y][x] = '#'
	pos += 2
print(80, 90)
for row in ans:
	print(''.join(row))


(a, b) = map(int, input().split())
grid = [['#' for _ in range(100)] for _ in range(50)] + [['.' for _ in range(100)] for _ in range(50)]
for i in range(a - 1):
	grid[i // 50 * 2][i % 50 * 2] = '.'
for i in range(b - 1):
	grid[-(i // 50 * 2) - 1][i % 50 * 2] = '#'
print(100, 100)
for g in grid:
	print(*g, sep='')


ansl1 = list('#' * (100 * 25))
ansl2 = list('.' * (100 * 25))
(a, b) = map(int, input().split())
for i in range(a - 1):
	ansl1[2 * i] = '.'
for i in range(b - 1):
	ansl2[2 * i] = '#'
print(100, 100)
for i in range(25):
	print(''.join(ansl1[i * 100:i * 100 + 100]))
	print('#' * 100)
for j in range(24, -1, -1):
	print(''.join(ansl2[j * 100:j * 100 + 100]))
	print('.' * 100)


from pprint import pprint

def create(A, B):
	is_swapped = False
	if A > B:
		larger = A
		A = B
		B = larger
		is_swapped = True
	(H, W) = (99, 99)
	dp = [['.' for i in range(W)] for j in range(H)]
	Ndot = 1
	Nsharp = 0
	for i in range(1, H - 1, 2):
		for j in range(1, W - 1, 2):
			dp[i][j] = '#'
			Nsharp += 1
	Nfill = 0
	for i in range(1, H - 2, 4):
		for j in range(1, W - 2, 4):
			if Nfill == A:
				break
			dp[i + 1][j] = '#'
			dp[i][j + 1] = '#'
			dp[i + 2][j + 1] = '#'
			dp[i + 1][j + 2] = '#'
			Ndot += 1
			Nsharp -= 3
			Nfill += 1
	for i in range(H):
		for j in range(W):
			if Nsharp == B:
				break
			elif i == 0 or i == H - 1 or j == 0 or (j == W - 1):
				continue
			elif dp[i][j] == '#' and dp[i - 1][j] == '.' and (dp[i + 1][j] == '.') and (dp[i][j - 1] == '.') and (dp[i][j + 1] == '.'):
				dp[i][j] = '.'
				Nsharp -= 1
	if Ndot > A:
		dp[2][1] = '.'
		Ndot -= 1
	if is_swapped:
		for i in range(H):
			for j in range(W):
				if dp[i][j] == '.':
					dp[i][j] = '#'
				else:
					dp[i][j] = '.'
	Ans = ''
	for row in dp:
		tmp = ''.join(row)
		tmp += '\n'
		Ans += tmp
	print(*[H, W])
	print(Ans)
(a, b) = map(int, input().split())
create(a, b)


import sys
(A, B) = map(int, sys.stdin.readline().split())
A -= 1
B -= 1
print(100, 100)
for i in range(100):
	for j in range(100):
		if i < 50:
			if A > 0 and i % 2 == 0 and (j % 2 == 0):
				print('.', end='')
				A -= 1
			else:
				print('#', end='')
		elif 50 <= i:
			if B > 0 and i % 2 == 1 and (j % 2 == 0):
				print('#', end='')
				B -= 1
			else:
				print('.', end='')
		if j == 99:
			print('')


import sys
input = sys.stdin.buffer.readline
from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

def main():
	(A, B) = getlist()
	ans = [['.'] * 100 for i in range(50)] + [['#'] * 100 for i in range(50)]
	for i in range(B - 1):
		ans[1 + 2 * (2 * i // 100)][(1 + 2 * i) % 100] = '#'
	for i in range(A - 1):
		ans[51 + 2 * (2 * i // 100)][(1 + 2 * i) % 100] = '.'
	print(100, 100)
	for i in range(100):
		print(''.join(ans[i]))
main()


(w, b) = map(int, input().split())
grid = []
for i in range(50):
	grid.append(['.'] * 100)
for i in range(50):
	grid.append(['#'] * 100)
w -= 1
b -= 1
cnt = 0
i = 0
j = 0
while cnt < b:
	grid[i][j] = '#'
	if j == 98:
		i += 2
		j = 1
	elif j == 99:
		i += 2
		j = 0
	else:
		j += 2
	cnt += 1
cnt = 0
i = 51
j = 0
while cnt < w:
	grid[i][j] = '.'
	if j == 98:
		i += 2
		j = 1
	elif j == 99:
		i += 2
		j = 0
	else:
		j += 2
	cnt += 1
print(100, 100)
for i in range(len(grid)):
	print(''.join(grid[i]))


(A, B) = [int(x) for x in input().split()]
K = 50
(h, w) = (2 * K, 2 * K)
cntA = A - 1
cntB = B - 1
print(h, w)
for i in range(h):
	pr = ''
	if i < K:
		for j in range(w):
			if cntA > 0:
				if i % 2 == 0 and j % 2 == 0:
					pr += '.'
					cntA -= 1
				else:
					pr += '#'
			else:
				pr += '#'
	else:
		pr = ''
		for j in range(w):
			if cntB > 0 and i > K:
				if i % 2 == 0 and j % 2 == 0:
					pr += '#'
					cntB -= 1
				else:
					pr += '.'
			else:
				pr += '.'
	print(pr)


(A, B) = map(int, input().split())
A -= 1
B -= 1
print('100 100')
ans = [['#' for i in range(100)] for j in range(100)]
for i in range(1, 99):
	for j in range(50, 99):
		ans[i][j] = '.'
i = 3
j = 3
while A > 0:
	ans[i][j] = '.'
	A -= 1
	i += 2
	if i > 93:
		i = 3
		j += 2
i = 3
j = 53
while B > 0:
	ans[i][j] = '#'
	B -= 1
	i += 2
	if i > 93:
		i = 3
		j += 2
for s in ans:
	print(''.join(s))


import sys
import math
import collections
import bisect
import itertools
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 16
MOD = 10 ** 9 + 7
ni = lambda : int(sys.stdin.readline().rstrip())
ns = lambda : map(int, sys.stdin.readline().rstrip().split())
na = lambda : list(map(int, sys.stdin.readline().rstrip().split()))
na1 = lambda : list(map(lambda x: int(x) - 1, sys.stdin.readline().rstrip().split()))

def main():
	(w, b) = ns()
	l = 100
	mat = [['#' for _ in range(l)] for __ in range(l)]
	if w == 1 and b == 1:
		mat[0][0] = '.'
	cnt = 0
	breakflg = False
	tmp = 1 if b > 1 else 0
	flg = False
	for i in range(0, l - 3, 3):
		for j in range(0, l - 3, 3):
			if not flg:
				if cnt < w - tmp:
					around = '#'
					center = '.'
				else:
					flg = True
					break
			if flg:
				if cnt < w - tmp + b - 1:
					around = '.'
					center = '#'
				else:
					breakflg = True
					break
			for n in range(3):
				for m in range(3):
					mat[i + n][j + m] = center if n == 1 and m == 1 else around
			cnt += 1
		if breakflg:
			break
	print(l, l)
	for mi in mat:
		print(*mi, sep='')
main()


(a, b) = map(int, input().split())
ans = [['.' for i in range(100)] for j in range(100)]
for i in range(100):
	for j in range(50):
		ans[i][j] = '#'
a -= 1
b -= 1
ind = 0
while True:
	loop = min(a, 25)
	for i in range(loop):
		ans[ind][i * 2] = '.'
	a -= loop
	ind += 2
	if a == 0:
		break
ind = 0
while True:
	loop = min(b, 25)
	for i in range(loop):
		ans[ind][51 + i * 2] = '#'
	b -= loop
	ind += 2
	if b == 0:
		break
print('100 100')
for i in range(100):
	for j in range(99):
		print(ans[i][j], end='')
	print(ans[i][-1])


def fill(X, c, start):
	for i in range(X):
		(q, r) = divmod(i, 49)
		i = q * 2 + start
		j = r * 2 + 1 if q % 2 else r * 2 + 2
		ans[i][j] = c
(A, B) = map(int, input().split())
(H, W) = (100, 100)
ans = [list('#' * W) if i < W // 2 else list('.' * W) for i in range(H)]
fill(A - 1, '.', 1)
fill(B - 1, '#', H // 2 + 1)
print(H, W)
[print(''.join(row)) for row in ans]


(A, B) = list(map(int, input().split()))
M = [['.'] * 100 for _ in range(50)] + [['#'] * 100 for _ in range(50)]
A -= 1
B -= 1
for i in range(B):
	i *= 2
	M[i // 50 * 2][i % 50] = '#'
for i in range(A):
	i *= 2
	M[51 + i // 50 * 2][i % 50] = '.'
print((100, 100))
for m in M:
	print(''.join(m))


field = [['#'] * 100 for _ in range(50)] + [['.'] * 100 for _ in range(50)]
(a, b) = map(int, input().split())
a -= 1
b -= 1
x = 0
y = 0
for _ in range(a):
	field[x][y] = '.'
	y += 2
	if y >= 100:
		y = 0
		x += 2
x = 99
y = 0
for _ in range(b):
	field[x][y] = '#'
	y += 2
	if y >= 100:
		y = 0
		x -= 2
print(100, 100)
for row in field:
	print(''.join(row))


(A, B) = list(map(int, input().split()))
H = 100
W = 20

def const(s1, s2, ct):
	ans = [[s1] * W for _ in range(H)]
	for i in range(ct):
		ans[i // (W // 2) * 2][i % (W // 2) * 2] = s2
	return ans
ans1 = const('#', '.', A - 1)
ans2 = const('.', '#', B - 1)
ans = []
for i in range(H):
	S1 = ans1[i]
	S2 = ans2[i][::-1]
	ans.append(S1 + S2)
print((H, len(ans[0])))
for a in ans:
	print(''.join(a))


def main():
	BK = '#'
	WH = '.'
	(A, B) = map(int, input().split())
	g = []
	for _ in range(50):
		g.append([BK] * 100)
	for _ in range(50):
		g.append([WH] * 100)
	(r, c) = (1, 1)
	for _ in range(A - 1):
		g[r][c] = WH
		c += 2
		if c > 99:
			c = 1
			r += 2
	(r, c) = (51, 1)
	for _ in range(B - 1):
		g[r][c] = BK
		c += 2
		if c > 99:
			c = 1
			r += 2
	print(100, 100)
	for row in g:
		print(*row, sep='')

def __starting_point():
	main()
__starting_point()


(A, B) = list(map(int, input().split()))
(h, w) = (99, 99)
a = '.'
b = '#'
if A > B:
	(a, b) = (b, a)
	(B, A) = (A, B)
A -= 1
ANS = [[b] * w for i in range(h)]
B -= 1
idx = 0
for i in range(w):
	ANS[0][i] = a
for i in range(49):
	ANS[i][0] = a
	ANS[i][-1] = a
while B:
	idx += 1
	for i in range(1, w, 2):
		if B == 0:
			ANS[idx][i] = a
			ANS[idx][i + 1] = a
		else:
			ANS[idx][i] = b
			ANS[idx][i + 1] = a
			B -= 1
	idx += 1
	for i in range(w):
		ANS[idx][i] = a
idx += 1
for i in range(idx, 49):
	for j in range(w):
		ANS[i][j] = a
for i in range(w):
	ANS[49][i] = b
for i in range(49, h):
	ANS[i][0] = b
	ANS[i][-1] = b
idx = 49
while A:
	idx += 1
	for i in range(1, w, 2):
		if A == 0:
			ANS[idx][i] = b
			ANS[idx][i + 1] = b
		else:
			ANS[idx][i] = a
			ANS[idx][i + 1] = b
			A -= 1
	idx += 1
	for i in range(w):
		ANS[idx][i] = b
for i in range(idx, h):
	for j in range(w):
		ANS[i][j] = b
print((h, w))
for i in range(h):
	print(''.join(ANS[i]))


(A, B) = map(int, input().split())
grid = [['#'] * 50 + ['.'] * 50 for i in range(100)]
A -= 1
B -= 1
for i in range(0, 43, 2):
	for j in range(0, 100, 2):
		if A <= 0:
			break
		grid[j][i] = '.'
		A -= 1
for i in range(66, 100, 2):
	for j in range(0, 100, 2):
		if B <= 0:
			break
		grid[j][i] = '#'
		B -= 1
print(100, 100)
for i in range(100):
	print(''.join(grid[i]))


def main():
	(A, B) = list(map(int, input().split()))
	N = 100
	S = [['#'] * N for _ in range(N // 2)] + [['.'] * N for _ in range(N // 2, N)]
	a = A - 1
	b = B - 1
	for i in range(1, N // 2 - 1, 2):
		for j in range(0, N, 2):
			if a > 0:
				S[i][j] = '.'
				a -= 1
			else:
				break
		if a <= 0:
			break
	for i in range(N // 2 + 1, N, 2):
		for j in range(0, N, 2):
			if b > 0:
				S[i][j] = '#'
				b -= 1
			else:
				break
		if b <= 0:
			break
	print((N, N))
	print('\n'.join([''.join(S[i]) for i in range(N)]))

def __starting_point():
	main()
__starting_point()


(a, b) = map(int, input().split())
grid = [['.' for i in range(100)] for j in range(50)] + [['#' for i in range(100)] for j in range(50)]
white = 0
black = 0
for i in range(49):
	if black == b - 1:
		break
	if i % 2 == 0:
		continue
	for j in range(100):
		if i % 2 == j % 2:
			grid[i][j] = '#'
			black += 1
		if black == b - 1:
			break
for i in range(50, 100):
	if white == a - 1:
		break
	if i % 2 == 0:
		continue
	for j in range(100):
		if i % 2 == j % 2:
			grid[i][j] = '.'
			white += 1
		if white == a - 1:
			break
print(100, 100)
for i in range(100):
	stri = ''
	for j in grid[i]:
		stri += j
	print(stri)


(a, b) = list(map(int, input().split()))
g1 = [['#' for i in range(100)] for i in range(20)]
g2 = [['.' for i in range(100)] for i in range(20)]
(a, b) = (a - 1, b - 1)
j = 0
while a != 0:
	for i in range(0, 100, 2):
		g1[j][i] = '.'
		a -= 1
		if a == 0:
			break
	j += 2
j = 1
while b != 0:
	for i in range(0, 100, 2):
		g2[j][i] = '#'
		b -= 1
		if b == 0:
			break
	j += 2
g1.extend(g2)
print(40, 100)
for ele in g1:
	print(''.join(ele))


(a, b) = map(int, input().split())
print(100, 100)
for i in range(50):
	s = []
	for j in range(100):
		if (i + j) % 3 == 0 and (b - 1) * i > 0:
			s.append('#')
			b -= 1
		else:
			s.append('.')
	print(*s, sep='')
for i in range(50):
	s = []
	for j in range(100):
		if (i + j) % 3 == 0 and (a - 1) * i > 0:
			s.append('.')
			a -= 1
		else:
			s.append('#')
	print(*s, sep='')


def main():
	buf = input()
	buflist = buf.split()
	A = int(buflist[0])
	B = int(buflist[1])
	board = []
	for i in range(100):
		board.append([])
		for j in range(100):
			if i < 50:
				board[-1].append('#')
			else:
				board[-1].append('.')
	A_remaining = A - 1
	for i in range(0, 50, 2):
		if A_remaining <= 0:
			break
		for j in range(0, 100, 2):
			board[i][j] = '.'
			A_remaining -= 1
			if A_remaining <= 0:
				break
	B_remaining = B - 1
	for i in range(100 - 1, 50 - 1, -2):
		if B_remaining <= 0:
			break
		for j in range(0, 100, 2):
			board[i][j] = '#'
			B_remaining -= 1
			if B_remaining <= 0:
				break
	print(100, 100)
	for i in range(100):
		print(''.join(board[i]))
main()


(A, B) = map(int, input().split())
ans = [['' for i in range(100)] for j in range(100)]
for i in range(100):
	for j in range(100):
		if i < 50:
			ans[i][j] = '#'
		else:
			ans[i][j] = '.'
w = 1
b = 1
flag = 0
for i in range(50):
	for j in range(100):
		if i % 2 == 0 and (flag + j) % 2 == 0:
			if w < A:
				ans[i][j] = '.'
				w += 1
	if i % 2 == 0:
		flag ^= 1
flag = 0
for i in range(50):
	for j in range(100):
		if i % 2 == 0 and (flag + j) % 2 == 0:
			if b < B:
				ans[99 - i][j] = '#'
				b += 1
	if i % 2 == 0:
		flag ^= 1
print(100, 100)
for i in range(100):
	for j in range(100):
		print(ans[i][j], end='')
	print()


from math import ceil
(a, b) = map(int, input().split())
w = 52
r1 = ceil((a - 1) / ((w - 2) // 2))
r2 = ceil((b - 1) / (w // 2))
h = 1 + r1 * 2 + r2 * 2
print(h, w)
print('#' * (w - 1) + '.')
a -= 1
for i in range(r1):
	num = min(max(a, 0), (w - 2) // 2)
	print('#' + '.#' * num + '..' * ((w - 2) // 2 - num) + '.')
	print('#' * (w - 1) + '.')
	a -= (w - 2) // 2
b -= 1
for i in range(r2):
	num = min(max(b, 0), w // 2)
	print('.' * w)
	print('#.' * num + '..' * (w // 2 - num))
	b -= w // 2


(a, b) = map(int, input().split())
n = 100
grid = [['#'] * n for _ in range(n // 2)] + [['.'] * n for _ in range(n // 2)]
k = 0
cnt = 0
for i in range(a - 1):
	grid[k][2 * i - cnt] = '.'
	if 2 * i % 100 == n - 2:
		k += 2
		cnt += n
k = n // 2 + 1
cnt = 0
for i in range(b - 1):
	grid[k][2 * i - cnt] = '#'
	if 2 * i % 100 == n - 2:
		k += 2
		cnt += n
print(100, 100)
for i in grid:
	print(''.join(i))


def main():
	(a, b) = map(int, input().split())
	k = 50
	gw = [['.'] * 2 * k for _ in range(k)]
	gb = [['#'] * 2 * k for _ in range(k)]
	for i in range(b - 1):
		h = i // k * 2
		w = i % k * 2
		gw[h][w] = '#'
	for i in range(a - 1):
		h = i // k * 2 + 1
		w = i % k * 2 + 1
		gb[-h][-w] = '.'
	ans = gw + gb
	print(2 * k, 2 * k)
	for l in ans:
		print(*l, sep='')
main()


(A, B) = map(int, input().split())
T = [['.' for _ in range(100)] for _ in range(100)]
for i in range(50, 100):
	for j in range(100):
		T[i][j] = '#'
cnt = 1
for i in range(1, 48, 2):
	for j in range(1, 100, 2):
		if cnt < B:
			T[i][j] = '#'
			cnt += 1
cnt = 1
for i in range(51, 100, 2):
	for j in range(1, 100, 2):
		if cnt < A:
			T[i][j] = '.'
			cnt += 1
print(100, 100)
for i in range(100):
	print(''.join(T[i]))


(a, b) = map(int, input().split())
print(40, 100)
rows = ['#' * 100 for _ in range(20)] + ['.' * 100 for _ in range(20)]
rows[0] = '#.' * ((a - 1) % 50) + '##' * (50 - (a - 1) % 50)
for i in range((a - 1) // 50):
	rows[2 * i + 2] = '#.' * 50
rows[21] = '#.' * ((b - 1) % 50) + '..' * (50 - (b - 1) % 50)
for i in range((b - 1) // 50):
	rows[2 * i + 23] = '#.' * 50
print('\n'.join(rows))


from itertools import *
from math import *
from collections import *
from heapq import *
from bisect import bisect_left, bisect_right
from copy import deepcopy
inf = 10 ** 18
mod = 10 ** 9 + 7
from functools import reduce
import sys
sys.setrecursionlimit(10 ** 7)
(A, B) = map(int, input().split())
bd = []
for i in range(50):
	bd.append(['#' for _ in range(100)])
for i in range(50):
	bd.append(['.' for _ in range(100)])
for i in range(A - 1):
	bd[i // 50 * 2][i % 50 * 2] = '.'
for i in range(B - 1):
	bd[-(i // 50 * 2) - 1][i % 50 * 2] = '#'
print(100, 100)
for b in bd:
	print(*b, sep='')


(a, b) = map(int, input().split())
retBW = [['#'] * 100 for i in range(50)]
retWB = [['.'] * 100 for i in range(50)]
for i in range(0, 50, 2):
	for j in range(0, 100, 2):
		if a > 1:
			retBW[i][j] = '.'
			a -= 1
for i in range(1, 50, 2):
	for j in range(0, 100, 2):
		if b > 1:
			retWB[i][j] = '#'
			b -= 1
print('100 100')
for x in retBW:
	print(''.join(x))
for x in retWB:
	print(''.join(x))


(A, B) = map(int, input().split())
a = 626 - A
b = 530 - B
(H, W) = (99, 99)
S = [['.'] * W for _ in range(H)]
for i in range(H):
	for j in range(W):
		if i == 0 or i == H - 1:
			S[i][j] = '#'
			continue
		if j == 0 or j == W - 1:
			S[i][j] = '#'
			continue
		if i % 4 == 0 or i % 4 == 2:
			if j % 4 == 3:
				S[i][j] = '.'
			else:
				S[i][j] = '#'
		elif i % 4 == 1:
			if j % 4 == 0 or j % 4 == 2:
				S[i][j] = '#'
(h, w) = (1, 1)
while a != 0:
	S[h][w] = '#'
	a -= 1
	w += 4
	if w >= W:
		w = 1
		h += 4
(h, w) = (4, 3)
while b != 0:
	S[h][w] = '#'
	b -= 1
	w += 4
	if b == 0:
		break
	if w >= W - 4:
		h += 3
		S[h][0] = '#'
		w = 3
		h += 1
print(99, 99)
for i in range(H):
	output = ''.join(S[i])
	print(output)


(a, b) = map(int, input().split())
a_line = (a - 1) // 50 + 1
b_line = (b - 1) // 50 + 1
print(a_line * 2 + b_line * 2, 99)
for i in range(a_line):
	if i == a_line - 1:
		print('.#' * ((a - 1) % 50) + '#' * (99 - 2 * ((a - 1) % 50)))
	else:
		print('.#' * 49 + '.')
	print('#' * 99)
for i in range(b_line):
	print('.' * 99)
	if i == b_line - 1:
		print('#.' * ((b - 1) % 50) + '.' * (99 - 2 * ((b - 1) % 50)))
	else:
		print('#.' * 49 + '#')


(A, B) = map(int, input().split())
T = [['.' for _ in range(100)] for _ in range(100)]
for i in range(50, 100):
	for j in range(100):
		T[i][j] = '#'
cnt = 1
if B > 1:
	flag = 0
	for i in range(1, 49, 2):
		for j in range(1, 100, 2):
			T[i][j] = '#'
			cnt += 1
			if cnt == B:
				flag = 1
				break
		if flag == 1:
			break
cnt = 1
if A > 1:
	flag = 0
	for i in range(51, 99, 2):
		for j in range(1, 100, 2):
			T[i][j] = '.'
			cnt += 1
			if cnt == A:
				flag = 1
				break
		if flag == 1:
			break
print(100, 100)
for i in range(100):
	print(''.join(T[i]))


K = 33
L = K * 2
s = [['#' for j in range(L)] for i in range(K)]
t = [['.' for j in range(L)] for i in range(K)]
(A, B) = map(int, input().split())

def color(s, j0, i1, c):
	j = j0
	k = j0 * 2
	for i in range(1, i1):
		if L <= k:
			j += 1
			k = (j & 1) << 1
		s[j][k] = c
		k += 4
color(s, 0, A, '.')
color(t, 1, B, '#')
print(L, L)
f = lambda s: print('\n'.join(map(lambda s: ''.join(s), s)))
f(s)
f(t)


import math
import queue
from collections import deque, defaultdict
import heapq as hpq
from sys import stdin, setrecursionlimit
ipt = stdin.readline
setrecursionlimit(10 ** 7)

def main():
	(a, b) = list(map(int, ipt().split()))
	if a == 1 and b == 1:
		print((1, 2))
		print('.#')
		return ()
	print((100, 100))
	a -= 1
	b -= 1
	ni = 0
	while a >= 50:
		print('.#' * 50)
		print('#' * 100)
		ni += 2
		a -= 50
	print('.#' * a + '##' * (50 - a))
	print('#' * 100)
	ni += 2
	for i in range(50 - ni):
		print('#' * 100)
	ni = 0
	while b >= 50:
		print('.' * 100)
		print('.#' * 50)
		ni += 2
		b -= 50
	print('.' * 100)
	print('.#' * b + '..' * (50 - b))
	ni += 2
	for i in range(50 - ni):
		print('.' * 100)
	return

def __starting_point():
	main()
__starting_point()


(a, b) = map(int, input().split())
t = [['.'] * 100 for _ in range(50)] + [['#'] * 100 for _ in range(50)]
j = 0
for i in range(b - 1):
	j += 3
	if j % 100 == 0 or j % 100 == 99:
		j += 3
	t[j // 100][j % 100] = '#'
j = 100 * 100 - 1
for i in range(a - 1):
	j -= 3
	if j % 100 == 0 or j % 100 == 99:
		j -= 3
	t[j // 100][j % 100] = '.'
print(100, 100)
for x in t:
	print(''.join(x))


(A, B) = map(int, input().split())
(h, w) = (100, 100)
print(h, w)
G = [['#' if i < 30 else '.' for j in range(w)] for i in range(h)]
A -= 1
B -= 1
for i in range(A // 50):
	for j in range(50):
		G[2 * i][j * 2] = '.'
for j in range(A % 50):
	G[2 * (A // 50)][2 * j] = '.'
for i in range(B // 50):
	for j in range(50):
		G[2 * i + 40][j * 2] = '#'
for j in range(B % 50):
	G[40 + 2 * (B // 50)][2 * j] = '#'
for line in G:
	print(''.join(line))


(A, B) = list(map(int, input().split()))

def paint1(ans):
	a = 1
	for i in range(0, 49, 2):
		for j in range(0, 100, 2):
			if a == A:
				return
			ans[i][j] = '.'
			a += 1

def paint2(ans):
	b = 1
	for i in range(51, 100, 2):
		for j in range(0, 100, 2):
			if b == B:
				return
			ans[i][j] = '#'
			b += 1

def main():
	ans = [['#'] * 100 for _ in range(50)] + [['.'] * 100 for _ in range(50)]
	paint1(ans)
	paint2(ans)
	print(100, 100)
	for r in ans:
		print(''.join(r))
main()


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop, heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10 ** 9 + 7
inf = float('inf')

def I():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))
(a, b) = LI()
lst = []
for _ in range(50):
	lst.append(['#'] * 100)
for _ in range(50):
	lst.append(['.'] * 100)
print(100, 100)
cnt = 0
flg = True
if cnt != a - 1:
	for i in range(25 - 1):
		for j in range(25 - 1):
			lst[2 * i][2 * j] = '.'
			cnt += 1
			if cnt == a - 1:
				flg = False
				break
		if not flg:
			break
cnt = 0
flg = True
if cnt != b - 1:
	for i in range(25 + 1, 50)[::-1]:
		for j in range(25 + 1, 50)[::-1]:
			lst[2 * i + 1][2 * j + 1] = '#'
			cnt += 1
			if cnt == b - 1:
				flg = False
				break
		if not flg:
			break
for i in range(100):
	print(''.join(lst[i]))


def main():
	(a, b) = map(int, input().split())
	(s, k) = '.#'
	ans = [[k] * 100 for _ in range(50)] + [[s] * 100 for _ in range(50)]
	col = 0
	row = 0
	for _ in range(a - 1):
		ans[row][col] = s
		col += 2
		if col == 100:
			col = 0
			row += 2
	col = 0
	row = 99
	for _ in range(b - 1):
		ans[row][col] = k
		col += 2
		if col == 100:
			col = 0
			row -= 2
	print(100, 100)
	for row in ans:
		print(''.join(row))
main()


import sys

def main():
	input = sys.stdin.readline
	(A, B) = list(map(int, input().split()))
	(h, w) = (100, 100)
	G = [[0] * w for _ in range(h)]
	for i in range(50):
		for j in range(w):
			G[i][j] = 1
	(A, B) = (A - 1, B - 1)
	for i in range(0, 50, 2):
		if A <= 0:
			break
		for j in range(0, 100, 2):
			if A <= 0:
				break
			G[i][j] = 0
			A -= 1
	for i in range(99, 50, -2):
		if B <= 0:
			break
		for j in range(0, 100, 2):
			if B <= 0:
				break
			G[i][j] = 1
			B -= 1
	print((h, w))
	for i in range(h):
		print(''.join(['.' if G[i][j] == 0 else '#' for j in range(w)]))

def __starting_point():
	main()
__starting_point()


(A, B) = map(int, input().split())
a_line = (A - 1) // 50 + 1
b_line = (B - 1) // 50 + 1
print(2 * a_line + 2 * b_line, 99)
for i in range(a_line):
	if i == a_line - 1:
		print('.#' * ((A - 1) % 50) + '#' * (99 - 2 * ((A - 1) % 50)))
	else:
		print('.#' * 49 + '.')
	print('#' * 99)
for i in range(b_line):
	print('.' * 99)
	if i == b_line - 1:
		print('#.' * ((B - 1) % 50) + '.' * (99 - 2 * ((B - 1) % 50)))
	else:
		print('#.' * 49 + '#')


(a, b) = map(int, input().split())
print(100, 100)
ans = [list('#' * 100) for _ in range(50)] + [list('.' * 100) for _ in range(50)]
for i in range(a - 1):
	h = i // 50 * 2
	w = i % 50 * 2
	ans[h][w] = '.'
for i in range(b - 1):
	h = i // 50 * 2 + 51
	w = i % 50 * 2
	ans[h][w] = '#'
for i in ans:
	print(''.join(i))


(A, B) = map(int, input().split())
g = [['.'] * 100 for i in range(25)] + [['#'] * 100 for i in range(25)]
(i, j) = (1, 0)
for x in range(B - 1):
	g[i][j] = '#'
	if j < 98:
		j += 2
	else:
		(i, j) = (i + 2, 0)
(i, j) = (26, 0)
for x in range(A - 1):
	g[i][j] = '.'
	if j < 98:
		j += 2
	else:
		(i, j) = (i + 2, 0)
print(50, 100)
print(*[''.join(g[l]) for l in range(50)], sep='\n')


from math import ceil
(A, B) = map(int, input().split())
W = 52
R1 = ceil((A - 1) / ((W - 2) // 2))
R2 = ceil((B - 1) / (W // 2))
H = 1 + R1 * 2 + R2 * 2
print(H, W)
print('#' * (W - 1) + '.')
A -= 1
for i in range(R1):
	num = min(max(A, 0), (W - 2) // 2)
	print('#' + '.#' * num + '..' * ((W - 2) // 2 - num) + '.')
	print('#' * (W - 1) + '.')
	A -= (W - 2) // 2
B -= 1
for i in range(R2):
	num = min(max(B, 0), W // 2)
	print('.' * W)
	print('#.' * num + '..' * (W // 2 - num))
	B -= W // 2


(a, b) = map(int, input().split())
d = [['#' if i < 50 else '.' for _ in range(100)] for i in range(100)]
for i in range(a - 1):
	d[i // 50 * 4][i % 50 * 2] = '.'
for i in range(b - 1):
	d[99 - i // 50 * 2][i % 50 * 2] = '#'
print(100, 100)
for i in range(100):
	print(*d[i], sep='')


(white, black) = list(map(int, input().split()))
print('50 100')
n_col = 100
for row_i in range(25):
	if row_i % 2 == 0:
		print('#' * n_col)
	elif white > 1:
		white_in_row = min(49, white - 1)
		print('#.' * white_in_row + '#' * (n_col - 2 * white_in_row))
		white -= white_in_row
	else:
		print('#' * n_col)
for row_i in range(25):
	if row_i % 2 == 0:
		print('.' * n_col)
	elif black > 1:
		black_in_row = min(49, black - 1)
		print('.#' * black_in_row + '.' * (n_col - 2 * black_in_row))
		black -= black_in_row
	else:
		print('.' * n_col)


(A, B) = map(int, input().split())
N = 100
board = [['.#'[row >= N // 2] for _ in range(N)] for row in range(N)]
for i in range(B - 1):
	(r, c) = (i // 25 * 2, i % 25 * 2)
	board[r][c] = '#'
for i in range(A - 1):
	(r, c) = (i // 25 * 2, i % 25 * 2)
	board[-r - 1][c] = '.'
print(N, N)
print('\n'.join((''.join(row) for row in board)))


def get_next_int():
	return int(float(input()))

def get_next_ints(delim=' '):
	return tuple([int(float(x)) for x in input().split(delim)])

def get_next_str():
	return input()

def get_next_strs(delim=' '):
	return tuple(input().split(delim))

def get_next_by_types(*value_types, delim=' '):
	return tuple([t(x) for (t, x) in zip(value_types, input().split(delim))])

def solve():
	(A, B) = get_next_ints()
	K = 2
	while K * 2 * K / 4 < max(A, B):
		K *= 2
	grid = [['#'] * 2 * K for i in range(K)]
	grid.extend([['.'] * 2 * K for i in range(K)])
	(x, y) = (0, 0)
	while A > 1:
		grid[y][x] = '.'
		if x + 2 >= 2 * K:
			y += 2
			x = 0
		else:
			x += 2
		A -= 1
	(x, y) = (2 * K - 1, 2 * K - 1)
	while B > 1:
		grid[y][x] = '#'
		if x - 2 < 0:
			y -= 2
			x = 2 * K - 1
		else:
			x -= 2
		B -= 1
	print(2 * K, 2 * K)
	for row in grid:
		print(''.join(row))
solve()


m = []
for i in range(100):
	m.append([])
	for j in range(100):
		m[i].append('.' if i // 50 > 0 else '#')
(a, b) = map(int, input().split())
for i in range(1, a):
	x = i // 50 * 2
	y = i % 50 * 2
	m[x][y] = '.'
for i in range(1, b):
	x = 99 - i // 50 * 2
	y = 99 - i % 50 * 2
	m[x][y] = '#'
print('100 100')
for i in range(100):
	print(''.join(m[i]))


(A, B) = map(int, input().split())
N = 100
print(N, N)
v = [['.' for j in range(N)] for i in range(N)]
for i in range(N // 2, N):
	for j in range(N):
		v[i][j] = '#'
for a in range(A - 1):
	i = a // (N // 2) * 2 + N // 2 + 1
	j = a % (N // 2) * 2
	v[i][j] = '.'
for b in range(B - 1):
	i = b // (N // 2) * 2
	j = b % (N // 2) * 2
	v[i][j] = '#'
for i in range(N):
	line = ''
	for j in range(N):
		line += v[i][j]
	print(line)


(a, b) = map(int, input().split())
s = [['.'] * 99 if i < 50 else ['#'] * 99 for i in range(100)]
print(100, 99)
for i in range(b - 1):
	row = i * 2 // 99 * 2
	col = i * 2 % 99
	s[row][col] = '#'
for i in range(a - 1):
	row = i * 2 // 99 * 2 + 51
	col = i * 2 % 99
	s[row][col] = '.'
for i in s:
	for j in i:
		print(j, end='')
	print()


from sys import stdout
printn = lambda x: stdout.write(str(x))
inn = lambda : int(input())
inl = lambda : list(map(int, input().split()))
inm = lambda : list(map(int, input().split()))
ins = lambda : input().strip()
DBG = True
BIG = 999999999
R = 10 ** 9 + 7

def ddprint(x):
	if DBG:
		print(x)
(a, b) = inm()
c = [['#'] * 50 for i in range(45)]
c.extend([['.'] * 50 for i in range(45)])
for z in range(a - 1):
	c[z // 25 * 2][z % 25 * 2] = '.'
for z in range(b - 1):
	c[z // 25 * 2 + 50][z % 25 * 2] = '#'
print('90 50')
for i in range(90):
	print(''.join(c[i]))


(A, B) = map(int, input().split())
res = []

def make(t, cnt):
	res = []
	for i in range(25):
		res.append([t] * 100)
		tmp = [t] * 100
		for j in range(50):
			if cnt == 0:
				break
			tmp[2 * j] = t ^ 1
			cnt -= 1
		res.append(tmp)
	return res
mp = '.#'.__getitem__
ans = make(0, B - 1) + make(1, A - 1)
print(100, 100)
for l in ans:
	print(*map(mp, l), sep='')


(a, b) = map(int, input().split())
d = '.#' * (a - 1)
s = '.#' * (b - 1)
print(100, 100)
for i in range(100):
	if i < 50:
		if i % 2 == 0:
			if len(d) > 0:
				if len(d) > 99:
					print(d[:100])
					d = d[100:]
				else:
					print(d + '#' * (100 - len(d)))
					d = ''
			else:
				print('#' * 100)
		else:
			print('#' * 100)
	elif i % 2 == 1:
		if len(s) > 0:
			if len(s) > 99:
				print(s[:100])
				s = s[100:]
			else:
				print(s + '.' * (100 - len(s)))
				s = ''
		else:
			print('.' * 100)
	else:
		print('.' * 100)


import sys
sys.setrecursionlimit(10 ** 7)

def getnum(t=int):
	return t(sys.stdin.buffer.readline())

def numline(t=int):
	return map(t, sys.stdin.buffer.readline().split())

def numread(t=int):
	return map(t, sys.stdin.buffer.read().split())

def getstr():
	return sys.stdin.readline().strip()

def strline():
	return sys.stdin.readline().strip().split()

def strread():
	return sys.stdin.read().strip().split()

def main():
	(A, B) = numline()
	S = [list('.' * 50 + '#' * 50) for _ in range(50)]
	whites = 1
	blacks = 1
	for i in range(1, 49, 2):
		if blacks == B:
			break
		for j in range(1, 49, 2):
			if blacks == B:
				break
			S[i][j] = '#'
			blacks += 1
	for i in range(1, 49, 2):
		if whites == A:
			break
		for j in range(51, 99, 2):
			if whites == A:
				break
			S[i][j] = '.'
			whites += 1
	print(50, 100)
	for s in S:
		print(''.join(s))

def __starting_point():
	main()
__starting_point()


(a, b) = map(int, input().split())
buf = [['.'] * 100 for _ in range(50)] + [['#'] * 100 for _ in range(50)]
(bd, bm) = divmod(b - 1, 50)
for i in range(0, (bd + (bm > 0)) * 2, 2):
	for j in range(0, bm * 2 if i == bd * 2 else 100, 2):
		buf[i][j] = '#'
(ad, am) = divmod(a - 1, 50)
for i in range(0, (ad + (am > 0)) * 2, 2):
	for j in range(0, am * 2 if i == ad * 2 else 100, 2):
		buf[i + 51][j] = '.'
print(100, 100)
print('\n'.join((''.join(row) for row in buf)))


(a, b) = map(int, input().split())
if a <= b:
	m = '.'
	M = '#'
	mc = a
	Mc = b
else:
	m = '#'
	M = '.'
	mc = b
	Mc = a
s = [[m] * 100 for _ in range(100)]
tmp = [[M, M, M, m], [M, m, M, m], [M, M, M, m], [m, m, m, m]]
tmp2 = [[M, m, m, m], [m, m, m, m], [m, m, m, m], [m, m, m, m]]
i = 0
for i in range(mc - 1):
	(u, v) = (i * 4 // 100, i * 4 % 100)
	u *= 4
	for x in range(4):
		for y in range(4):
			s[u + x][v + y] = tmp[x][y]
for j in range(i + 1, i + 1 + (Mc - (mc - 1))):
	(u, v) = (j * 4 // 100, j * 4 % 100)
	u *= 4
	for x in range(4):
		for y in range(4):
			s[u + x][v + y] = tmp2[x][y]
print(100, 100)
print('\n'.join([''.join(item) for item in s]))


(a, b) = map(int, input().split())
m = [[0 for _ in range(100)] for _ in range(100)]
for i in range(50, 100):
	for j in range(100):
		m[i][j] = 1
a -= 1
b -= 1
for i in range(0, 48, 2):
	if b == 0:
		break
	for j in range(0, 100, 2):
		m[i][j] = 1
		b -= 1
		if b == 0:
			break
for i in range(99, 50, -2):
	if a == 0:
		break
	for j in range(0, 100, 2):
		m[i][j] = 0
		a -= 1
		if a == 0:
			break
print(100, 100)
for i in range(100):
	for j in range(100):
		if m[i][j] == 0:
			print('.', end='')
		else:
			print('#', end='')
	print()


(a, b) = list(map(int, input().split()))
ls = [['#'] * 99 for i in range(49)] + [['.'] * 99 for i in range(49)]
(i, j) = (0, 0)
for c in range(a - 1):
	ls[i][j] = '.'
	if j >= 97:
		j = 0
		i += 2
	else:
		j += 2
(i, j) = (51, 0)
for c in range(b - 1):
	ls[i][j] = '#'
	if j >= 97:
		j = 0
		i += 2
	else:
		j += 2
print(98, 99)
for j in range(98):
	print(''.join(ls[j]))


s = [['.'] * 100 for i in range(50)] + [['#'] * 100 for i in range(50)]
(a, b) = map(int, input().split())
a -= 1
b -= 1
(a1, a2) = (a % 50, a // 50)
(b1, b2) = (b % 50, b // 50)
for i in range(b2):
	for j in range(50):
		s[i * 2][j * 2] = '#'
for j in range(b1):
	s[48][j * 2] = '#'
for i in range(a2):
	for j in range(50):
		s[51 + i * 2][j * 2] = '.'
for j in range(a1):
	s[98][j * 2] = '.'
print(100, 100)
for i in s:
	print(''.join(i))


def solve():
	(A, B) = map(int, input().split())
	print(100, 100)
	rem = B - 1
	for i in range(50):
		if i % 2 == 1:
			line = '.' * 100
			print(line)
			continue
		line = ''
		for j in range(50):
			if rem > 0:
				line += '#.'
				rem -= 1
			else:
				line += '..'
		print(line)
	rem = A - 1
	for i in range(50):
		if i % 2 == 0:
			line = '#' * 100
			print(line)
			continue
		line = ''
		for j in range(50):
			if rem > 0:
				line += '.#'
				rem -= 1
			else:
				line += '##'
		print(line)
solve()


import math
ni = lambda : int(ns())
na = lambda : list(map(int, input().split()))
ns = lambda : input()
(a, b) = na()
(R, C) = (100, 100)
G = [['#' for i in range(C)] for j in range(R)]
for i in range(R):
	for j in range(50, 100):
		G[i][j] = '.'
a -= 1
b -= 1
p_a = a // 25
r_a = a % 25
p_b = b // 25
r_b = b % 25
for i in range(0, 2 * p_a, 2):
	for j in range(0, 50, 2):
		G[i][j] = '.'
for i in range(0, 2 * r_a, 2):
	G[2 * p_a][i] = '.'
for i in range(0, 2 * p_b, 2):
	for j in range(51, 100, 2):
		G[i][j] = '#'
for i in range(51, 50 + 2 * r_b, 2):
	G[2 * p_b][i] = '#'
print(100, 100)
for i in range(R):
	print(''.join(G[i]))


(a, b) = map(int, input().split(' '))
ar = []
for i in range(50):
	l = ['#' for j in range(100)]
	ar.append(l)
for i in range(50):
	l = ['.' for j in range(100)]
	ar.append(l)
print(100, 100)
count = 0
for i in range(48, -1, -2):
	if count == a - 1:
		break
	if i % 2 == 0:
		for j in range(0, 100, 2):
			ar[i][j] = '.'
			count += 1
			if count == a - 1:
				break
	else:
		for j in range(1, 100, 2):
			ar[i][j] = '.'
			count += 1
			if count == a - 1:
				break
count = 0
for i in range(99, 50, -2):
	if count == b - 1:
		break
	if i % 2 == 0:
		for j in range(0, 100, 2):
			ar[i][j] = '#'
			count += 1
			if count == b - 1:
				break
	else:
		for j in range(1, 100, 2):
			ar[i][j] = '#'
			count += 1
			if count == b - 1:
				break
for r in ar:
	print(''.join(r))


G = [['#'] * 100 for i in range(100)]
for i in range(50, 100):
	for j in range(100):
		G[i][j] = '.'
(A, B) = map(int, input().split())
A -= 1
B -= 1
(i, j) = (0, 0)
while A > 0:
	G[i][j] = '.'
	A -= 1
	j += 2
	if j > 99:
		j = 0
		i += 2
(i, j) = (99, 0)
while B > 0:
	G[i][j] = '#'
	B -= 1
	j += 2
	if j > 99:
		j = 0
		i -= 2
print(100, 100)
for i in range(100):
	print(''.join(G[i]))


import sys
import math
import copy
import random
from heapq import heappush, heappop, heapify
from functools import cmp_to_key
from bisect import bisect_left, bisect_right
from collections import defaultdict, deque, Counter
input = sys.stdin.readline
getS = lambda : input().strip()
getN = lambda : int(input())
getList = lambda : list(map(int, input().split()))
getZList = lambda : [int(x) - 1 for x in input().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
divide = lambda x: pow(x, MOD - 2, MOD)

def nck(n, k, kaijyo):
	return npk(n, k, kaijyo) * divide(kaijyo[k]) % MOD

def npk(n, k, kaijyo):
	if k == 0 or k == n:
		return n % MOD
	return kaijyo[n] * divide(kaijyo[n - k]) % MOD

def fact_and_inv(SIZE):
	inv = [0] * SIZE
	fac = [0] * SIZE
	finv = [0] * SIZE
	inv[1] = 1
	fac[0] = fac[1] = 1
	finv[0] = finv[1] = 1
	for i in range(2, SIZE):
		inv[i] = MOD - MOD // i * inv[MOD % i] % MOD
		fac[i] = fac[i - 1] * i % MOD
		finv[i] = finv[i - 1] * inv[i] % MOD
	return (fac, finv)

def renritsu(A, Y):
	A = np.matrix(A)
	Y = np.matrix(Y)
	Y = np.reshape(Y, (-1, 1))
	X = np.linalg.solve(A, Y)
	return X.flatten().tolist()[0]

class TwoDimGrid:

	def __init__(self, h, w, wall='#'):
		self.h = h
		self.w = w
		self.size = (h + 2) * (w + 2)
		self.wall = wall
		self.get_grid()

	def get_grid(self):
		grid = [self.wall * (self.w + 2)]
		for i in range(self.h):
			grid.append(self.wall + getS() + self.wall)
		grid.append(self.wall * (self.w + 2))
		self.grid = grid

	def init_cost(self):
		self.cost = [INF] * self.size

	def pos(self, x, y):
		return y * (self.w + 2) + x

	def getgrid(self, x, y):
		return self.grid[y][x]

	def get(self, x, y):
		return self.cost[self.pos(x, y)]

	def set(self, x, y, v):
		self.cost[self.pos(x, y)] = v
		return

	def show(self):
		for i in range(self.h + 2):
			print(self.cost[(self.w + 2) * i:(self.w + 2) * (i + 1)])

	def showsome(self, tgt):
		for t in tgt:
			print(t)
		return

	def showsomejoin(self, tgt):
		for t in tgt:
			print(''.join(t))
		return

	def search(self):
		grid = self.grid
		move = [(0, 1), (0, -1), (1, 0), (-1, 0)]
		move_eight = [(0, 1), (0, -1), (1, 0), (-1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]

def solve():
	(a, b) = getList()
	print(100, 100)
	for i in range(100):
		tmp = []
		for j in range(100):
			if i < 50:
				if j % 2 == 1 or i % 2 == 1 or a <= 1:
					tmp.append('#')
				else:
					tmp.append('.')
					a -= 1
			elif j % 2 == 1 or i % 2 == 0 or b <= 1:
				tmp.append('.')
			else:
				tmp.append('#')
				b -= 1
		print(''.join(tmp))

def main():
	n = getN()
	for _ in range(n):
		s = ''.join([random.choice(['F', 'T']) for i in range(20)])
		print(s)
		solve(s, 1, 0)
	return

def __starting_point():
	solve()
__starting_point()


(a, b) = list(map(lambda x: int(x) - 1, input().split()))
m = [[0] * 50 + [1] * 50 for i in range(100)]
(x, y) = (-2, 0)
for i in range(a):
	x += 2
	if x == 50:
		x = 0
		y += 2
	m[y][x] = 1
(x, y) = (49, 0)
for i in range(b):
	x += 2
	if x == 101:
		x = 51
		y += 2
	m[y][x] = 0
print(100, 100)
for i in range(100):
	for j in range(100):
		print('.' * m[i][j] + '#' * (1 - m[i][j]), end='')
	print()


(b, a) = map(int, input().split())
white = '.' * 100
black = '#' * 100
wb = '.#' * 50
ban = []
num_b = b - 1
num_a = a - 1
gyo_b = num_b // 50
ret_b = num_b % 50
gyo_a = num_a // 50
ret_a = num_a % 50
for i in range(gyo_a):
	ban.append(wb)
	ban.append(white)
ban.append('.#' * ret_a + '..' * (50 - ret_a))
ban.append(white)
for i in range(50 - 2 * (gyo_a + 1)):
	ban.append(white)
for i in range(50 - 2 * (gyo_b + 1)):
	ban.append(black)
for i in range(gyo_b):
	ban.append(wb)
	ban.append(black)
ban.append('.#' * ret_b + '##' * (50 - ret_b))
ban.append(black)
print(100, 100)
for item in ban:
	print(''.join(item))


import math

def main():
	(A, B) = map(int, input().split())
	(A, B) = (B, A)
	if A == B == 1:
		print(1, 2)
		print('.#')
		return
	N = 50 if max(A, B) >= 50 else max(A, B)
	ans = []
	if A != 1:
		if B != 1:
			a = A - 1
		else:
			a = A
		while a > 0:
			tmp = []
			for i in range(N):
				if a <= 0:
					tmp.append('..')
				else:
					tmp.append('#.')
					a -= 1
			ans.append(''.join(tmp))
			ans.append('.' * N * 2)
	if B != 1:
		if A != 1:
			b = B - 1
		else:
			b = B
		ans.append('#' * N * 2)
		while b > 0:
			tmp = []
			for i in range(N):
				if b <= 0:
					tmp.append('##')
				else:
					tmp.append('.#')
					b -= 1
			ans.append(''.join(tmp))
			ans.append('#' * N * 2)
	print(len(ans), len(ans[0]))
	for l in ans:
		print(l)
main()


import math
import fractions
import sys
import bisect
import heapq
import collections
from collections import Counter
from collections import deque
import pprint
import itertools
from functools import lru_cache
sr = lambda : input()
ir = lambda : int(sr())
lr = lambda : list(map(int, sr().split()))

def factorization(n):
	arr = []
	temp = n
	if n == 1:
		return arr
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr

def power(a, n, mod):
	x = 1
	while n:
		if n & 1:
			x *= a % mod
		n >>= 1
		a *= a % mod
	return x % mod

def kaijo(n, l, mod):
	if n == 0:
		return 1
	a = n
	tmp = n - 1
	while tmp >= l:
		a = a * tmp % mod
		tmp -= 1
	return a

class UnionFind:

	def __init__(self, n):
		self.n = n
		self.parents = [-1] * n

	def find(self, x):
		if self.parents[x] < 0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self, x, y):
		x = self.find(x)
		y = self.find(y)
		if x == y:
			return
		if self.parents[x] > self.parents[y]:
			(x, y) = (y, x)
		self.parents[x] += self.parents[y]
		self.parents[y] = x

	def size(self, x):
		return -self.parents[self.find(x)]

	def same(self, x, y):
		return self.find(x) == self.find(y)

	def members(self, x):
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i) == root]

	def roots(self):
		return [i for (i, x) in enumerate(self.parents) if x < 0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()}

	def __str__(self):
		return '\n'.join(('{}: {}'.format(r, self.members(r)) for r in self.roots()))

def make_divisors(n):
	divisors = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			divisors.append(i)
			if i != n // i:
				divisors.append(n // i)
	divisors.sort()
	return divisors

class kukankousin:

	def __init__(self, n):
		self.n = n
		self.N0 = 2 ** (self.n - 1).bit_length()
		self.data = [None] * (2 * self.N0)
		self.INF = (-1, 2 ** 31 - 1)

	def update(self, l, r, x):
		L = l + self.N0
		R = r + self.N0
		while L < R:
			if R & 1:
				R -= 1
				self.data[R - 1] = x
			if L & 1:
				self.data[L - 1] = x
				L += 1
			L >>= 1
			R >>= 1

	def _query(self, k):
		k += self.N0 - 1
		s = self.INF
		while k >= 0:
			if self.data[k]:
				s = max(s, self.data[k])
			k = (k - 1) // 2
		return s

	def query(self, k):
		return self._query(k)[1]
inf = 10 ** 18
mod = 10 ** 9 + 7

def __starting_point():
	(a, b) = lr()
	(h, w) = (96, 99)
	m = [['#' for j in range(w)] for i in range(h)]
	for i in range(48, h):
		for j in range(w):
			m[i][j] = '.'
	for k in range(a - 1):
		y = k // 33
		x = k % 33
		y = y * 3 + 1
		x = x * 3 + 1
		m[y][x] = '.'
	for k in range(b - 1):
		y = 16 + k // 33
		x = k % 33
		y = y * 3 + 1
		x = x * 3 + 1
		m[y][x] = '#'
	print(h, w)
	for l in m:
		print(*l, sep='')
__starting_point()


import sys
import numpy as np
stdin = sys.stdin
ri = lambda : int(rs())
rl = lambda : list(map(int, stdin.readline().split()))
rs = lambda : stdin.readline().rstrip()
(A, B) = rl()
grid = [['.'] * 100 for _ in range(50)] + [['#'] * 100 for _ in range(50)]
for i in range(B - 1):
	(row, column) = divmod(i, 50)
	row *= 2
	column *= 2
	grid[row][column] = '#'
for i in range(A - 1):
	(row, column) = divmod(i, 50)
	row *= 2
	column *= 2
	grid[99 - row][column] = '.'
print(100, 100)
for x in grid:
	print(*x, sep='')


(A, B) = map(int, input().split())
w = '.'
b = '#'
ans = [[b] * 20 + [w] * 20 for _ in range(100)]
for i in range(A - 1):
	x = 2 * (i // 50)
	y = i % 50 * 2
	ans[y][x] = w
for i in range(B - 1):
	x = 2 * (i // 50) + 21
	y = i % 50 * 2
	ans[y][x] = b
print('100 40')
for i in range(100):
	print(''.join(ans[i]))


(a, b) = map(int, input().split())
f = [['#' for _ in range(100)] for _ in range(50)] + [['.' for _ in range(100)] for _ in range(50)]
for i in range(a - 1):
	h = i // 50 * 2
	w = i % 50 * 2
	f[h][w] = '.'
for i in range(b - 1):
	h = -(i // 50 * 2 + 1)
	w = i % 50 * 2
	f[h][w] = '#'
print(100, 100)
for line in f:
	print(''.join(line))


(a, b) = map(int, input().split())
print('40 100')
kuro = [['#' for i in range(100)] for j in range(20)]
siro = [['.' for i in range(100)] for j in range(20)]
cou = 0
flag = False
for i in range(0, 20, 2):
	if flag:
		break
	for j in range(0, 100, 2):
		if cou >= a - 1:
			flag = True
			break
		elif cou < a - 1:
			cou += 1
			kuro[i][j] = '.'
cou = 0
flag = False
for i in range(1, 20, 2):
	if flag:
		break
	for j in range(0, 100, 2):
		if cou >= b - 1:
			flag = True
			break
		elif cou < b - 1:
			cou += 1
			siro[i][j] = '#'
for i in range(20):
	for j in range(100):
		print(kuro[i][j], end='')
	print()
for i in range(20):
	for j in range(100):
		print(siro[i][j], end='')
	print()


(x, y) = map(int, input().split())
(r, s) = (100, 100)
a = [['.' for j in range(s)] for i in range(r)]
for i in range(1, r, 2):
	a[i] = ['.'] + ['#' for j in range(s - 1)]
for i in range(r):
	a[i][s - 1] = '#'
(ca, cb) = (1, 1)
(l, d) = (2, s - 3)
while ca < x:
	for i in range(0, r, 2):
		a[i][d] = '#'
		ca += 1
		if ca == x:
			break
	d -= 2
while cb < y:
	for i in range(1, r, 2):
		a[i][l] = '.'
		cb += 1
		if cb == y:
			break
	l += 2
print(r, s)
for i in range(r):
	print(''.join(a[i]))


import sys
readline = sys.stdin.readline
read = sys.stdin.read
(a, b) = list(map(int, readline().split()))
h = w = 100
res = [[0] * w for _ in range(50)] + [[1] * w for _ in range(50)]
a -= 1
b -= 1
q = a // 50
r = a % 50
for i in range(q):
	res[2 * i][::2] = [1] * 50
res[2 * q][:2 * r:2] = [1] * r
q = b // 50
r = b % 50
for i in range(q):
	res[2 * i + 51][::2] = [0] * 50
res[2 * q + 51][:2 * r:2] = [0] * r
print((h, w))
for ri in res:
	print(''.join(('#' if rij == 0 else '.' for rij in ri)))


def main():
	(A, B) = map(int, input().split())
	board = [['#'] * 100 for _ in range(50)] + [['.'] * 100 for _ in range(50)]
	wc = 1
	for i in range(0, 50, 2):
		for j in range(0, 100, 2):
			if wc >= A:
				break
			board[i][j] = '.'
			wc += 1
		if wc >= A:
			break
	bc = 1
	for i in range(51, 100, 2):
		for j in range(0, 100, 2):
			if bc >= B:
				break
			board[i][j] = '#'
			bc += 1
		if bc >= B:
			break
	print(100, 100)
	for r in board:
		print(*r, sep='')
main()


(a, b) = map(int, input().split())
(width, height) = (100, 100)
ans = [['#'] * width for _ in range(height // 2)]
for _ in range(height // 2):
	ans.append(['.'] * width)
for i in range(height // 2 // 2):
	if a == 1:
		break
	for j in range(width // 2):
		if a == 1:
			break
		ans[i * 2][j * 2] = '.'
		a -= 1
for i in range(height // 2 // 2):
	if b == 1:
		break
	for j in range(width // 2):
		if b == 1:
			break
		ans[-i * 2 - 1][-j * 2 - 1] = '#'
		b -= 1
print(height, width)
print('\n'.join(map(lambda x: ''.join(x), ans)))


(A, B) = list(map(int, input().split()))
QA = (A - 1) // 50
QB = (B - 1) // 50
RA = (A - 1) % 50
RB = (B - 1) % 50

def PRINTw(x):
	for j in range(x):
		print('.#', end='')
	for j in range(50 - x):
		print('##', end='')
	print()
	for j in range(100):
		print('#', end='')
	print()

def PRINTb(x):
	for j in range(100):
		print('.', end='')
	print()
	for j in range(x):
		print('.#', end='')
	for j in range(50 - x):
		print('..', end='')
	print()
print('40 100')
for i in range(QA):
	PRINTw(50)
PRINTw(RA)
for i in range(10 - (QA + 1)):
	PRINTw(0)
for i in range(QB):
	PRINTb(50)
PRINTb(RB)
for i in range(10 - (QB + 1)):
	PRINTb(0)


(a, b) = map(int, input().split())
print(41, 100)
for _ in range(10):
	for _ in range(50):
		print('.', end='')
		if b > 1:
			print('#', end='')
			b -= 1
		else:
			print('.', end='')
	print()
	print('.' * 100)
print('#' * 100)
for _ in range(10):
	for _ in range(50):
		print('#', end='')
		if a > 1:
			print('.', end='')
			a -= 1
		else:
			print('#', end='')
	print()
	print('#' * 100)


(A, B) = map(int, input().split(' '))
s1 = '####################################################################################################\n.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#\n'
s2 = '....................................................................................................\n#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.\n'
black = '#' * 100 + '\n'
white = '.' * 100 + '\n'
cnt = (A - 1) // 50
mer = (A - 1) % 50
if mer == 0:
	up = s1 * cnt + black
else:
	up = s1 * cnt + black + '.#' * mer + '#' * (100 - 2 * mer) + '\n' + black
cnt = (B - 1) // 50
mer = (B - 1) % 50
if mer == 0:
	down = s2 * cnt + white
else:
	down = s2 * cnt + white + '#.' * mer + '.' * (100 - 2 * mer) + '\n' + white
print(str(len(up + down) // 100) + ' 100')
print(up + down)


(a, b) = map(int, input().split())
d = [['#'] * 100 for i in range(100)]
a -= 1
b -= 1
for i in range(50, 100):
	for j in range(100):
		d[i][j] = '.'
for i in range(0, 50, 2):
	for j in range(0, 100, 2):
		if a == 0:
			break
		d[i][j] = '.'
		a -= 1
	if a == 0:
		break
for i in range(99, 49, -2):
	for j in range(0, 100, 2):
		if b == 0:
			break
		d[i][j] = '#'
		b -= 1
print(100, 100)
for i in d:
	print(*i, sep='')


def f(base, m, c):
	for i in range(16):
		for j in range(32):
			if not m:
				break
			base[2 * i][j * 2] = c
			m -= 1
		else:
			continue
		break
	return base
(w, b) = map(int, input().split())
print(64, 64)
print('\n'.join(map(''.join, f([['#'] * 64 for _ in range(32)], w - 1, '.') + [['.'] * 64] + f([['.'] * 64 for _ in range(31)], b - 1, '#'))))


(a, b) = map(int, input().split())
ret = []
for i in range(50):
	ret.append(list('#' * 100))
for i in range(50):
	ret.append(list('.' * 100))
a -= 1
b -= 1
i = 0
j = 0
while a > 0:
	ret[i][j] = '.'
	j += 2
	a -= 1
	if j >= 99:
		j = 0
		i += 2
i = 99
j = 0
while b > 0:
	ret[i][j] = '#'
	j += 2
	b -= 1
	if j >= 99:
		j = 0
		i -= 2
print(100, 100)
for i in range(100):
	print(''.join(ret[i]))


import sys
input = sys.stdin.buffer.readline

def RD():
	return sys.stdin.read()

def II():
	return int(input())

def MI():
	return map(int, input().split())

def MF():
	return map(float, input().split())

def LI():
	return list(map(int, input().split()))

def LF():
	return list(map(float, input().split()))

def TI():
	return tuple(map(int, input().split()))

def main():
	(a, b) = MI()
	G = []
	for _ in range(25):
		G += [list('...#') * 25, list('.#.#') * 25, list('...#') * 25, list('####') * 25]
	for i in range(25):
		for j in range(24):
			if a < 25 ** 2:
				G[4 * i][4 * j + 3] = '.'
				a += 1
			else:
				break
	for i in range(25):
		if a < 25 ** 2:
			G[4 * i + 3][0] = '.'
			a += 1
		else:
			break
	for i in range(25):
		for j in range(25):
			if b < 25 ** 2 + 1:
				G[4 * i + 1][4 * j + 1] = '.'
				b += 1
	print(100, 100)
	for i in G:
		print(*i, sep='')

def __starting_point():
	main()
__starting_point()


(A, B) = list(map(int, input().split()))
grid = []
for i in range(50):
	grid.append(['.'] * 100)
for i in range(50):
	grid.append(['#'] * 100)
A -= 1
B -= 1
for i in range(0, 50, 2):
	for j in range(0, 100, 2):
		if B == 0:
			break
		grid[i][j] = '#'
		B -= 1
	else:
		continue
	break
grid = grid[::-1]
for i in range(0, 50, 2):
	for j in range(0, 100, 2):
		if A == 0:
			break
		grid[i][j] = '.'
		A -= 1
	else:
		continue
	break
print('100 100')
for row in grid:
	print(''.join(row))


import sys, math, collections, heapq, itertools
F = sys.stdin

def single_input():
	return F.readline().strip('\n')

def line_input():
	return F.readline().strip('\n').split()

def gcd(a, b):
	(a, b) = (max(a, b), min(a, b))
	while a % b > 0:
		(a, b) = (b, a % b)
	return b

def solve():
	(A, B) = map(int, line_input())
	grid = [[] for i in range(100)]
	for i in range(50):
		grid[i] = ['#'] * 100
		grid[50 + i] = ['.'] * 100
	for a in range(A - 1):
		w = a % 25
		h = a // 25
		if h % 2 == 0:
			grid[h][4 * w] = '.'
		else:
			grid[h][4 * w + 2] = '.'
	for b in range(B - 1):
		w = b % 25
		h = b // 25
		if h % 2 == 0:
			grid[51 + h][4 * w] = '#'
		else:
			grid[51 + h][4 * w + 2] = '#'
	print(100, 100)
	for h in range(100):
		print(''.join(map(str, grid[h])))
solve()


(a, b) = map(int, input().split())
print('100 100')
for i in range(50):
	if i % 2:
		print('#' * 100)
	else:
		for j in range(50):
			if a > 1:
				a -= 1
				print('.#', end='')
			else:
				print('##', end='')
		print()
for i in range(50):
	if i % 2 == 0:
		print('.' * 100)
	else:
		for j in range(50):
			if b > 1:
				b -= 1
				print('.#', end='')
			else:
				print('..', end='')
		print()


import sys

def input():
	return sys.stdin.readline().strip()

def mapint():
	return map(int, input().split())
sys.setrecursionlimit(10 ** 9)
(A, B) = mapint()
print(100, 100)
white_grid = [['.'] * 100 for _ in range(50)]
black_grid = [['#'] * 100 for _ in range(50)]
(w, b) = (A - 1, B - 1)
for i in range(0, 50, 2):
	for j in range(0, 100, 2):
		if b:
			white_grid[i][j] = '#'
			b -= 1
		else:
			break
	else:
		continue
	break
for i in range(1, 50, 2):
	for j in range(0, 100, 2):
		if w:
			black_grid[i][j] = '.'
			w -= 1
		else:
			break
	else:
		continue
	break
for w in white_grid:
	print(''.join(w))
for b in black_grid:
	print(''.join(b))


from bisect import *
from collections import *
from heapq import *
(A, B) = list(map(int, input().split()))
A -= 1
B -= 1
lst = [['#' if m < 50 else '.' for i in range(100)] for m in range(100)]
for h in range(0, 100, 2):
	for w in range(0, 100, 2):
		if A == 0:
			break
		lst[h][w] = '.'
		A -= 1
	if A == 0:
		break
for h in range(99, -1, -2):
	for w in range(0, 100, 2):
		if B == 0:
			break
		lst[h][w] = '#'
		B -= 1
	if B == 0:
		break
print((100, 100))
for i in range(100):
	print(''.join(lst[i]))


(A, B) = map(int, input().split())
whiteline = list('.' * 100)
blackline = list('#' * 100)
checkline = ['.' if i % 2 == 0 else '#' for i in range(100)]
ans = []
b = B - 1
for h in range(21):
	if h % 2 == 0:
		ans.append(whiteline)
	elif b >= 50:
		ans.append(checkline)
		b -= 50
	elif b > 0:
		P = list('.' * 100)
		for i in range(b):
			P[2 * i] = '#'
		b = 0
		ans.append(P)
	else:
		ans.append(whiteline)
a = A - 1
for h in range(21):
	if h % 2 == 0:
		ans.append(blackline)
	elif a >= 50:
		ans.append(checkline)
		a -= 50
	elif a > 0:
		P = list('#' * 100)
		for i in range(a):
			P[2 * i] = '.'
		a = 0
		ans.append(P)
	else:
		ans.append(blackline)
print(len(ans), len(ans[0]))
for L in ans:
	print(''.join(L))


(A, B) = map(int, input().split())
G = [['#' if j <= 49 else '.' for i in range(100)] for j in range(100)]
x = y = 0
for i in range(A - 1):
	G[y][x] = '.'
	x += 2
	if x >= 100:
		x -= 100
		y += 2
x = 0
y = 51
for i in range(B - 1):
	G[y][x] = '#'
	x += 2
	if x >= 100:
		x -= 100
		y += 2
print(100, 100)
for s in G:
	print(''.join(s))


import sys
input = sys.stdin.readline

def main():
	(A, B) = [int(x) for x in input().split()]
	common = min(A, B)
	ans = [['-'] * 100 for j in range(100)]
	if A == B == 1:
		print(1, 2)
		print('.#')
		return
	reverse = False
	if B == 1:
		reverse = True
		(A, B) = (B, A)
	A -= 1
	B -= 1
	Borg = B
	Aorg = A
	Arow = -(-A // 50) * 2
	Brow = -(-B // 50) * 2
	for i in range(Brow):
		if i % 2 == 0:
			for j in range(100):
				if j % 2 == 0:
					if Borg <= 0:
						ans[i][j] = '.'
					else:
						ans[i][j] = '#'
						Borg -= 1
				else:
					ans[i][j] = '.'
		else:
			for j in range(100):
				ans[i][j] = '.'
	for i in range(Brow, Brow + Arow):
		if (i - Brow) % 2 == 0:
			for j in range(100):
				ans[i][j] = '#'
		else:
			for j in range(100):
				if j % 2 == 0:
					if Aorg <= 0:
						ans[i][j] = '#'
					else:
						ans[i][j] = '.'
						Aorg -= 1
				else:
					ans[i][j] = '#'
	for i in range(Brow + Arow, 100):
		for j in range(100):
			ans[i][j] = '#'
	print(100, 100)
	if reverse:
		for i in range(100):
			for j in range(100):
				if ans[i][j] == '#':
					print('.', end='')
				else:
					print('#', end='')
			print()
	else:
		for a in ans:
			print(''.join(a))

def __starting_point():
	main()
__starting_point()


(a, b) = map(int, input().split())
grid = [['#' if i < 50 else '.' for i in range(100)] for j in range(100)]
white_cnt = 1
while white_cnt < a:
	grid[white_cnt // 24 * 2][white_cnt % 24 * 2 + 1] = '.'
	white_cnt += 1
black_cnt = 1
while black_cnt < b:
	grid[black_cnt // 24 * 2][black_cnt % 24 * 2 + 50 + 1] = '#'
	black_cnt += 1
print(100, 100)
for i in range(100):
	print(''.join(grid[i]))


(A, B) = map(int, input().split())
U = [['#' for j in range(100)] for i in range(50)]
for w in range(A - 1):
	s = w // 50
	t = w % 50
	U[s * 2][t * 2] = '.'
D = [['.' for j in range(100)] for i in range(50)]
for b in range(B - 1):
	u = b // 50
	v = b % 50
	D[u * 2 + 1][v * 2] = '#'
print(100, 100)
for Ui in U:
	print(''.join(Ui))
for Di in D:
	print(''.join(Di))


import bisect
import functools
import heapq
import itertools
import sys
import math
import random
import time
from collections import Counter, deque, defaultdict
from functools import reduce
from operator import xor, itemgetter
from pprint import pprint
from types import FunctionType
from typing import List, Any
from sys import stdin
mod = 10 ** 9 + 7
sys.setrecursionlimit(10 ** 9)

def inp():
	return stdin.readline().rstrip()

def lmi():
	return list(map(int, stdin.readline().split()))

def narray(*shape, init: Any=0):
	if shape:
		return [narray(*shape[1:], init=init) for _ in range(shape[0])]
	if callable(init):
		return init()
	return init

def main():
	(A, B) = lmi()
	(H, W) = (100, 100)
	grid = narray(H, W)
	(white, black) = (A, B)
	white -= 1
	for i in range(0, H, 4):
		for j in range(0, W, 4):
			if white == 0 and black == 0:
				break
			elif black == 0:
				if i > 0:
					for (yd, xd) in ((-1, 0), (-1, 1), (-1, 2)):
						yy = i + yd
						xx = j + xd
						grid[yy][xx] = 1
				elif j > 0:
					for (yd, xd) in ((0, -1), (1, -1), (2, -1)):
						yy = i + yd
						xx = j + xd
						grid[yy][xx] = 1
			elif white == 0:
				yy = i + 1
				xx = j + 1
				grid[yy][xx] = 1
			for (yd, xd) in ((0, 0), (0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1), (2, 2)):
				yy = i + yd
				xx = j + xd
				grid[yy][xx] = 1
			white = max(0, white - 1)
			black = max(0, black - 1)
	print((100, 100))
	for line in grid:
		print(''.join(('#' if c else '.' for c in line)))

def __starting_point():
	main()
__starting_point()


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 15
mod = 10 ** 9 + 7

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(a, b) = LI()
	r = [['.'] * 50 + ['#'] * 50 for _ in range(100)]
	a -= 1
	b -= 1
	for i in range(0, 100, 2):
		for j in range(0, 40, 2):
			if b < 1:
				break
			r[i][j] = '#'
			b -= 1
		for j in range(60, 100, 2):
			if a < 1:
				break
			r[i][j] = '.'
			a -= 1
	return '100 100\n' + '\n'.join(map(lambda x: ''.join(x), r))
print(main())


(A, B) = map(int, input().split())
S = []
S.append('#' * 100)
a = A - 1
while a > 0:
	k = min(50, a)
	S.append('.#' * k + '##' * (50 - k))
	S.append('#' * 100)
	a -= k
S.append('.' * 100)
b = B - 1
while b > 0:
	k = min(50, b)
	S.append('.#' * k + '..' * (50 - k))
	S.append('.' * 100)
	b -= k
print(len(S), 100)
for s in S:
	print(s)


(A, B) = list(map(int, input().split()))
print(100, 100)
x1 = ''.join(['.'] * 100)
y1 = ''.join(['#'] * 100)
for i in range(25):
	x = ['.'] * 100
	for j in range(50):
		if B > 1:
			x[2 * j] = '#'
			B -= 1
	print(''.join(x))
	print(x1)
for i in range(25):
	print(y1)
	y = ['#'] * 100
	for j in range(50):
		if A > 1:
			y[2 * j] = '.'
			A -= 1
	print(''.join(y))


(A, B) = map(int, input().split())
ans = [['#'] * 100 for _ in range(50)]
ans_ = [['.'] * 100 for _ in range(50)]
ans.extend(ans_)
h = 0
w = 0
for i in range(A - 1):
	ans[h][w] = '.'
	w += 2
	if w >= 100:
		h += 2
		w = 0
h = 51
w = 0
for i in range(B - 1):
	ans[h][w] = '#'
	w += 2
	if w >= 100:
		h += 2
		w = 0
print(100, 100)
for i in range(100):
	print(''.join(ans[i]))


(A, B) = map(int, input().split())
Grid = []
for i in range(100):
	Grid += [[0] * 100]
acgrid = []
for _ in range(50):
	acgrid.append(1)
	acgrid.append(-1)
white = 1
black = 1
if A == 1 and B == 0:
	Grid = [1, -1]
else:
	i = 0
	while True:
		if white + 50 > A:
			break
		else:
			Grid[i] = acgrid
			Grid[i + 1] = [-1] * 100
			i += 2
			white += 50
	for j in range(50):
		if white != A:
			Grid[i][2 * j] = 1
			Grid[i][2 * j + 1] = -1
			white += 1
		else:
			Grid[i][2 * j] = -1
			Grid[i][2 * j + 1] = -1
	i += 1
	Grid[i] = [-1] * 100
	i += 1
	Grid[i] = [1] * 100
	i += 1
	while True:
		if black + 50 > B:
			break
		else:
			Grid[i] = acgrid
			Grid[i + 1] = [1] * 100
			i += 2
			black += 50
	for j in range(50):
		if black != B:
			Grid[i][2 * j] = 1
			Grid[i][2 * j + 1] = -1
			black += 1
		else:
			Grid[i][2 * j] = 1
			Grid[i][2 * j + 1] = 1
num = []
ans = []
for box in Grid:
	if box[0] == 0:
		break
	else:
		st = ''
		for s in box:
			if s == 1:
				st += '.'
			elif s == -1:
				st += '#'
		ans.append(st)
num.append(len(ans))
num.append(len(ans[0]))
print(num[0], num[1])
for st in ans:
	print(st)


def main():
	(a, b) = map(int, input().split())
	grid = [['#'] * 100 for _ in [0] * 50] + [['.'] * 100 for _ in [0] * 50]
	cnt = 0
	flag = False
	for i in range(0, 40, 2):
		for j in range(0, 100, 2):
			if cnt >= a - 1:
				flag = True
				break
			grid[i][j] = '.'
			cnt += 1
		if flag:
			break
	cnt = 0
	flag = False
	for i in range(60, 100, 2):
		for j in range(0, 100, 2):
			if cnt >= b - 1:
				flag = True
				break
			grid[i][j] = '#'
			cnt += 1
		if flag:
			break
	for i in range(100):
		grid[i] = ''.join(grid[i])
	print(100, 100)
	for i in grid:
		print(i)
main()


(A, B) = map(int, input().split())
L = []
for i in range(100):
	if i < 50:
		L.append(['.'] * 100)
	else:
		L.append(['#'] * 100)
B -= 1
for i in range(1, 50):
	for j in range(99):
		if i % 2 == 0 and j % 2 == 1 and (B > 0):
			L[i][j] = '#'
			B -= 1
A -= 1
for i in range(51, 100):
	for j in range(99):
		if i % 2 == 0 and j % 2 == 1 and (A > 0):
			L[i][j] = '.'
			A -= 1
print(100, 100)
for i in range(100):
	print(''.join(L[i]))


(a, b) = map(int, input().split())
line = ''.join(['.#'] * 50)
dot = ['.', '#']
cl = [''.join(['.'] * 100), ''.join(['#'] * 100)]
ba = [b - 1, a - 1]
ans = []
y = ans.append
for c in [0, 1]:
	y(cl[c])
	for i in range(ba[c] // 50):
		y(line)
		y(cl[c])
	y(''.join(['.#'] * (ba[c] % 50)) + cl[c][ba[c] % 50 * 2:])
	y(cl[c])
print(len(ans), 100)
for l in ans:
	print(''.join(l))