#K71577. Taco Floor Pattern
Taco Floor Pattern
Taco Floor Pattern
You are given two integers (n) and (m) representing the number of rows and columns respectively. Your task is to generate an (n \times m) floor pattern where each cell is a tile. The tile is light-colored (represented by '.') if the sum of its row and column indices is even, and dark-colored (represented by '#') if the sum is odd. The pattern must start with a light-colored tile at the top-left corner (position ((0,0))).
For example, if (n = 3) and (m = 3), the generated pattern should be:
.#. #.# .#.
Each row must be printed on a new line.
inputFormat
The input consists of a single line containing two space-separated integers (n) and (m) ((1 \leq n, m \leq 1000)), where (n) is the number of rows and (m) is the number of columns in the floor pattern.
outputFormat
Output the floor pattern consisting of (n) lines. Each line should contain a string of (m) characters. Each character is either '.' for a light-colored tile or '#' for a dark-colored tile, following the alternating pattern starting with '.' at the top-left.## sample
3 3
.#.
#.#
.#.
</p>