{-# LANGUAGE BangPatterns, MultiWayIf #-}
import Control.Arrow
import Control.Monad.Fix
import Data.Foldable
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as VU
import qualified Data.ByteString.Char8 as B
import Debug.Trace

w = 100
h = 50

solve :: Int -> Int -> V.Vector (VU.Vector Bool)
solve !b !a = V.concat [whiteArea, blackArea]
 where
  whiteArea =
    let
      blackH = (a - 1) `div` (w `div` 2)
      blackW = (a - 1) `mod` (w `div` 2)
      line   = VU.replicate w False
    in
      V.replicate h line
        V.// [ ( i * 2
               , if i < blackH
                 then
                   line VU.// [ (j, True) | j <- [0 .. w - 1], even j ]
                 else
                   line VU.// [ (j, True) | j <- [0 .. blackW * 2 - 1], even j ]
               )
             | i <- [0 .. blackH]
             ]
  blackArea =
    let
      whiteH = (b - 1) `div` (w `div` 2)
      whiteW = (b - 1) `mod` (w `div` 2)
      line   = VU.replicate w True
    in
      V.replicate h line
        V.// [ ( i * 2 + 1
               , if i < whiteH
                 then
                   line VU.// [ (j, False) | j <- [0 .. w - 1], even j ]
                 else
                   line
                     VU.// [ (j, False) | j <- [0 .. whiteW * 2 - 1], even j ]
               )
             | i <- [0 .. whiteH]
             ]

main = do
  let readInt = fmap (second B.tail) . B.readInt

  (a, b) <-
    (\vec -> (vec VU.! 0, vec VU.! 1)) . VU.unfoldrN 2 readInt <$> B.getLine

  let r = solve a b
  putStrLn $ show w ++ " " ++ show (2 * h)
  V.forM_ r $ \vec -> do
    VU.forM_ vec $ \b -> do
      putStr $ if b then "#" else "."
    putStrLn ""
