main :: IO ()
main = do
    [a, b] <- map read . words <$> getLine
    let matA = mat 5000 (a - 1) '.' '#'
    let matB = mat 5000 (b - 1) '#' '.'
    putStrLn "100 100"
    putStrLn $ reverse matA
    putStrLn matB

mat :: Int -> Int -> Char -> Char -> String
mat 0 _ _ _ = []
mat pos n c1 c2
    | (mod pos 100) == 0 && pos /= 5000 = '\n' : c1 : mat (pos - 1) n c1 c2
    | even (div pos 100) && odd pos && n /= 0 = c2 : mat (pos - 1) (n - 1) c1 c2
    | otherwise                                = c1 : mat (pos - 1) n c1 c2
    