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: competition

Starter code:

Solutions:





A,B = list(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])))



#!/usr/bin python3
# -*- coding: utf-8 -*-

a, b = list(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 = list(map(int,input().split()))
MAX = 100
ans = []
for i in range(MAX): #下地として上半分は白、下半分は黒。
  if i < MAX//2:
    temp = ["."]*MAX
  else:
    temp = ["#"]*MAX
  ans.append(temp)
#print(ans)
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

#print(ans)
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)


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
        else:
            if 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
        else:
            if 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]))

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]))

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
# sys.setrecursionlimit(1000000)

# input aliases
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  # inv[j] = j^{-1} mod MOD
    fac = [0] * SIZE  # fac[j] = j! mod MOD
    finv = [0] * SIZE  # finv[j] = (j!)^{-1} mod MOD
    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):
    # example 2x + y = 3, x + 3y = 4
    # A = [[2,1], [1,3]])
    # Y = [[3],[4]] または [3,4]
    A = np.matrix(A)
    Y = np.matrix(Y)
    Y = np.reshape(Y, (-1, 1))
    X = np.linalg.solve(A, Y)

    # [1.0, 1.0]
    return X.flatten().tolist()[0]

class TwoDimGrid:
    # 2次元座標 -> 1次元
    def __init__(self, h, w, wall="#"):
        self.h = h
        self.w = w
        self.size = (h+2) * (w+2)
        self.wall = wall
        self.get_grid()
        # self.init_cost()

    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):
        # 壁も含めて0-indexed 元々の座標だけ考えると1-indexed
        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)]
        # for i in range(1, self.h+1):
        #     for j in range(1, self.w+1):
        #         cx, cy = j, i
        #         for dx, dy in move_eight:
        #             nx, ny = dx + cx, dy + cy

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
            else:
                if 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():
    # main()
    solve()
__starting_point()

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()

field = [['#']*100 for _ in range(50)] + [['.']*100 for _ in range(50)]

a, b = list(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 = 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=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="")

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
  clms = (i % 50) * 2 + (rows % 2)
  ans[rows * 2][clms] = "."

for i in range(b - 1):
  rows = i // 50
  clms = (i % 50) * 2 + (rows % 2)
  ans[99 - rows * 2][clms] = "#"
  
print(100, 100)
for a in ans:
  print("".join(a))

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)

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())
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)

a,b=list(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()))
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]))

import sys
readline = sys.stdin.readline

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

grid = []
for i in range(50):
  grid.append(["#"] * 100)
  
for i in range(50):
  grid.append(["."] * 100)
  
# 前半の黒い部分からA-1箇所を白く塗る
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)))


# ARC093D

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]))

w,b = list(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=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))

def main():
    A, B = list(map(int, input().split()))
    # A -> 0, B -> 1
    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()

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

ii = lambda: int(input())
mi = lambda: list(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())
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='')

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()))
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)
#print(ans1)
#print(ans2)
ans = []
for i in range(H):
  S1 = ans1[i]
  S2 = ans2[i][::-1]
  ans.append(S1+S2)
#print("".join(["#","."])) 

print((H, len(ans[0])))
for a in ans:
  #print(type(a))
  print(("".join(a)))


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()

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 # and False
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])))


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()

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


ii = lambda: int(input())
mi = lambda: list(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=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()

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)))


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))

import sys
import numpy as np

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to only numbers
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

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='')
#56

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='')


def __starting_point():
    main()
__starting_point()

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)

import sys
import math
import collections
import bisect
import itertools

# import numpy as np

sys.setrecursionlimit(10 ** 7)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

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()))


# ===CODE===

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="")


def __starting_point():
    main()

__starting_point()

b, a = list(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)))


a, b = list(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)))


#!/usr/bin/env python3
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)]  # true => black

    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()

#!/usr/bin/env python3
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
    # If not flipped, False -> White (A), True -> Black (B)
    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())
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='')


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()

#from numba import njit, b1, i4, i8, f8, jit
#import numpy as np


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())
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="")

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()



# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache

#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"

#############
# Functions #
#############

######INPUT######
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)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): return()
def PE(arg): print(arg); return()
def YE(): print("Yes"); return()
def NE(): print("No"); return()

#####Shorten#####
def DD(arg): return defaultdict(arg)

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
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

######Factorization######
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

#####MakeDivisors######
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

#####MakePrimes######
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

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

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

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

#####ChangeBase#####
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]

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############

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 = 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)))


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
  else:
    if 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

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, 100, 2):
    if A == 0:
        break
    for w in range(0, 100, 2):
        ans[h][w] = '.'
        A -= 1
        if A == 0:
            break

for h in range(0, 100, 2)[::-1]:
    if B == 0:
        break
    for w in range(0, 100, 2):
        ans[h][w] = '#'
        B -= 1
        if B == 0:
            break

print((100, 100))
for a in ans:
    print((''.join(a)))


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)))


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])))


# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache

#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"

#############
# Functions #
#############

######INPUT######
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)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): return()
def PE(arg): print(arg); return()
def YE(): print("Yes"); return()
def NE(): print("No"); return()

#####Shorten#####
def DD(arg): return defaultdict(arg)

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
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

######Factorization######
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

#####MakeDivisors######
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

#####MakePrimes######
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

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

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

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

#####ChangeBase#####
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]

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############

A,B = IL()
print(100,100)

for i in range(25):
  P = 50
  while P:
    if A>1:
      if P != 1:
        print(".#",end="")
        A -= 1
      else:
        print(".#")
        A -= 1
    else:
      if P != 1:
        print("##",end="")
      else:
        print("##")
    P -= 1
  print("#"*100)

for i in range(25):
  P = 50
  print("."*100)
  while P:
    if B>1:
      if P != 1:
        print(".#",end="")
        B -= 1
      else:
        print(".#")
        B -= 1
    else:
      if P != 1:
        print("..",end="")
      else:
        print("..")
    P -= 1


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())
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()

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))


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
input = sys.stdin.buffer.readline

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

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()))
# rstrip().decode()

def main():
	a,b=MI()

	G=[]

	for _ in range(25):
		G+=[list("...#")*25,list(".#.#")*25,list("...#")*25,list("####")*25]

	#print(G)



	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()

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()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""
__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)))


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("")

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))


# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
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()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""
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


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


# n*(n-1)*...*(l+1)*l
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

# Union Find
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)

    # 区間[l, r+1)の値をxに書き換える
    # xは(t, value)という値にする (新しい値ほどtは大きくなる)
    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


    # a_iの現在の値を取得
    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
# mod = 998244353

# Press the green button in the gutter to run the script.
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()

A,B = list(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])))


# coding: utf-8
# Your code here!
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

# 0: 黒: #
print((h,w))
for ri in res:
    print(("".join("#" if rij==0 else "." for rij in ri)))





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)))


from pprint import pprint


def create(A,B):
    is_swapped = False
    if(A > B): 
        larger = A
        A = B
        B = larger
        is_swapped = True
    # A is smaller
    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  
    #pprint(dp)
    #print(Ndot,Nsharp)

    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
    #pprint(dp)

    #Delete Isolated #
    for i in range(H):
        for j in range(W):
            if(Nsharp == B):
                break
            else:
                if(i == 0 or i == H-1 or j == 0 or j == W-1):
                    continue
                else:
                    if(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
    #pprint(dp)
    #print(Ndot,Nsharp)

    if(Ndot > A):
        dp[2][1] = '.'
        Ndot -= 1

    #pprint(dp)
    #print(Ndot,Nsharp)


    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)

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="")

def printrow(num, s, t):
    for i in range(50):
        res = []
        for j in range(100):
            if (i + j) % 3 == 0 and (num - 1) * i > 0:
                res.append(s)
                num -= 1
            else:
                res.append(t)
        print(*res, sep='')

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

print(100, 100)
printrow(b, '#', '.')
printrow(a, '.', '#')


# input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
# import functools
# import itertools
# import math

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])))


#!python3

# input
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)))


def __starting_point():
    main()

__starting_point()

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())
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())
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]))

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)))


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()

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)

def main():
    BK = '#'
    WH = '.'

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

    g = []
    for _ in range(50):
        g.append([BK] * 100)  # 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()

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))

# editorial参照
# 格子まで詰め込もうとしたのが困難
# 十分大きい黒白の塊一つに孤立した白黒の点を取る

#最初のに出力h,w追加
a,b = list(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):
    w = (i//k)*2
    h = (i%k)*2
    W[w][h]="#"


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


    


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))

# editorial参照
# 格子まで詰め込もうとしたのが困難
# 十分大きい黒白の塊一つに孤立した白黒の点を取る


a,b = list(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)))


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:
                    # up
                    for yd, xd in ((-1, 0), (-1, 1), (-1, 2)):
                        yy = i + yd
                        xx = j + xd
                        grid[yy][xx] = 1
                elif j > 0:
                    # left
                    for yd, xd in ((0, -1), (1, -1), (2, -1)):
                        yy = i + yd
                        xx = j + xd
                        grid[yy][xx] = 1
            elif white == 0:
                # center
                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 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())

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 = 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)))


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)


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())
m=[[0 for _ in range(100)] for _ in range(100)]
#paint lower half as 1 
for i in range(50,100):
    for j in range(100):
        m[i][j]=1
a-=1 #0 means black
b-=1 #1 means white 
#paint chess board like pattern of b white dots in upper half
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
     
#now paint a black dots in lower half
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=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))

"""

Wは100で固定する。
1行目でできるかぎり連結成分の数が多くなるようにする。


W=100で固定し、白黒格子上になるように列を組む。
白と黒どちらかが規定数をオーバーしたら次の行で調整を入れて数を減らす。
ここでは、白が規定数に達したと仮定しよう。
白色の数に調整を入れたら、次の行では
"""
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=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]))

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())
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 = 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 = list(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])))



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):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=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):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
# https://atcoder.jp/contests/arc093/tasks/arc093_b

# 条件を満たすものを出力しろ
# 連結成分が指定されている
# 100*100のマスに限定して考えれば簡単。
# 50*100のマスの中で499個の島を作ることはできるよね？(2行あたり25個作れるはず, 40行もあれば十分作れる)

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()


import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
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()

# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
inf = float('inf')
mod = 10 ** 9 + 7

# from decorator import stop_watch
#
#
# @stop_watch
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)

    # # test
    # from random import randint
    # import tool.testcase as tt
    # from tool.testcase import random_str, random_ints
    # solve()

__starting_point()

import sys
# import math
# import bisect
# import numpy as np
# from decimal import Decimal
# from numba import njit, i8, u1, b1 #JIT compiler
# from itertools import combinations, product
# from collections import Counter, deque, defaultdict

# sys.setrecursionlimit(10 ** 6)
MOD = 10 ** 9 + 7
INF = 10 ** 9
PI = 3.14159265358979323846

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')

def __starting_point():
    Main()
__starting_point()

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)