local mfl = math.floor
local a, b = io.read("*n", "*n")
local t = {}
for i = 1, 5000 do t[i] = false end
for i = 5001, 10000 do t[i] = true end
for i = 1, a - 1 do
  local row = (mfl(i / 25) + 1) * 2
  local col = (i % 25 + 1) * 2
  t[(row - 1) * 100 + col] = true
end
for i = 1, b - 1 do
  local row = 50 + (mfl(i / 25) + 1) * 2
  local col = (i % 25 + 1) * 2
  t[(row - 1) * 100 + col] = false
end
print("100 100")
for row = 1, 100 do
  for col = 1, 100 do
    local idx = (row - 1) * 100 + col
    if col ~= 1 then io.write(" ") end
    io.write(t[idx] and "." or "#")
  end
  io.write("\n")
end
