Chessboard

Print an N by M grid of asterisks and dots where the top left cell is an asterisk and adjacent cells always differ.

Easy2ArrayImplementationSimulationMathNo attempts yetTime limit2sMemory limit512 MB

Problem

Write a program that prints a chessboard with N rows and M columns under these rules.

  • The top left cell is an asterisk (*).
  • Every cell that touches a cell holding an asterisk, above, below, to the left or to the right, holds a dot (.).
  • Every cell that touches a cell holding a dot holds an asterisk.

Printing a chessboard with 8 rows and 8 columns under these rules gives:

*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*

Input

One line with two integers N and M separated by a space. N is the number of rows and M is the number of columns. Both N and M are between 1 and 10.

Output

Print N lines, each holding M characters, that form the chessboard.