import Data.List

main=do
  (a:b:_)<-map read.words<$>getLine::IO[Int]
  let k = 50
  putStrLn.unwords $ map show [k*2,k*2]
  putStr.unlines.sp (k*2)$solve k a b

solve k a b = mk k '#' '.' (k-2) (a-1) ++ replicate (k*2) '#' ++ replicate (k*2) '.' ++ (reverse $ mk k '.' '#' k (b-1))

sp n "" = []
sp n s = (take n s) : (sp n $ drop n s)

mk k _ _ 0 _ = ""
mk k u v l n
  | n >= k = (take (k*2) $ cycle [u,v]) ++ replicate (k*2) u ++ mk k u v (l-2) (n-k)
  | n == 0 = replicate (k*2*2) u ++ mk k u v (l-2) 0
  | True = take (k*2*2) ((take (n*2) $ cycle [u,v]) ++ replicate (k*2*2) u) ++ mk k u v (l-2) 0
