import Control.Applicative
main = do
    [a,b] <- map read . words <$> getLine
    putStrLn "100 100"
    mapM_ putStrLn $ solve (a-1) (b-1)

solve :: Int -> Int -> [String]
solve a b = drawA a ++ drawB b

drawA :: Int -> [String]
drawA a = reverse $ foldl addA2lines [] [a,a-50..a-1200]

drawB :: Int -> [String]
drawB b = foldl addB2lines [] [b,b-50..b-1200]

addA2lines :: [String] -> Int -> [String]
addA2lines list n = (replicate 100 '#'):(drawline n):list

addB2lines :: [String] -> Int -> [String]
addB2lines list n = (replicate 100 '.'):(map (\x -> if x == '.' then '#' else '.') (drawline n)):list

drawline :: Int -> String
drawline n = map (f n) [1..100]
    where f n x | (div x 2) < n && (mod x 2) == 1 = '.'
                | otherwise = '#'
