Problem K. Knitting sweaters

Author:Антон Карабанов   Time limit:1 sec
Input file:Standard input   Memory limit:256 Mb
Output file:Standard output  

Statement

If we trust contemporary sources, the renowned patterns on winter clothing first emerged in the Norwegian town of Setesdal. The popularization of Nordic sweaters was influenced by the film "Serenade of the Sun Valley." The sweater featuring the protagonist's reindeer became a sought-after item, initially in men's and later in women's wardrobes. Nowadays, sweaters with such Christmas patterns are increasingly visible on urban streets.

New Year is just around the corner! Hence, it's the perfect time to contemplate festive attire.

Timofey, a true fashion connoisseur, plans to handcraft a New Year sweater. Naturally, it should depict a reindeer with beautiful, branching antlers.

As a genuine programmer, Timofey decided that the reindeer antlers should represent a binary tree with 2n leaves and vertically centered lines of length k.

Since Timofey, a true knitter, is currently engrossed in the search for threads, needles, and hooks, assist him in drawing the reindeer antlers with the specified parameters.

Input format

The input file contains two lines with two natural numbers, n and k.

Output format

Output the required image. Utilize the # symbol (ASCII code 35) for forming lines and the . symbol (ASCII code 46) for the background. Your program should avoid outputting unnecessary rows or columns filled only with background symbols.

Constraints

1 ≤ n ≤ 8

2 ≤ k ≤ 10

Sample tests

No. Standard input Standard output
1
1
8
#.#
#.#
#.#
#.#
#.#
#.#
#.#
###
2
3
2
#.#.#.#.#.#.#.#
###.###.###.###
..#...#.#...#..
..#####.#####..
......#.#......
......###......
3
2
5
#.#.#.#
#.#.#.#
#.#.#.#
#.#.#.#
###.###
..#.#..
..#.#..
..#.#..
..#.#..
..###..

0.116s 0.007s 15