EasyRating 800
Snake Pattern
Draw an n × m grid snake: odd rows (1st, 3rd, …) are all #. Even rows have one # at the right end, then the left end, alternating. The rest are dots.
Input
Two integers n (odd) and m (3 ≤ n, m ≤ 50).
Output
n lines.
Sample 1
Input
3 3
Output
### ..# ###
Sample 2
Input
5 3
Output
### ..# ### #.. ###
Output appears here