#CCBCHBA0000089. Bàn cờ chẵn lẻ (Parity Chessboard)

Bàn cờ chẵn lẻ (Parity Chessboard)

Parity Chessboard

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

For an rr-by-cc grid, number rows and columns starting from 1. Print X at (i,j)(i,j) if i+ji+j is even, and O otherwise. Print rr rows of cc consecutive characters. The upper-left cell is X.

Input

One line contains integers r,cr,c.

Output

Print rr lines, each containing cc characters X or O.

Subtasks

  • Subtask 1 (20%): 1≤r,c≤21\le r,c\le 2.

  • Subtask 2 (30%): 1≤r,c≤81\le r,c\le 8.

  • Subtask 3 (50%): 1≤r,c≤301\le r,c\le 30.

Examples

Example 1

Input:

2 3

Output:

XOX
OXO

Explanation:

The upper-left coordinate sum is 2, an even number; parity alternates across rows and columns. For this sample, the input is 2 3; the displayed rows follow these rules exactly.

Example 2

Input:

1 1

Output:

X

Explanation:

The upper-left coordinate sum is 2, an even number; parity alternates across rows and columns. For this sample, the input is 1 1; the displayed rows follow these rules exactly.