Patterns#8259

Patterns

1 second
64 megabytes
Easy

Petro is inspired by the Ulam spiral, which highlights mysterious patterns in the distribution of prime numbers, and decides to create his own version.

He uses a square grid of size n \times n, where is a positive integer of his choice. The grid is filled with integers from to n^2, starting from the top-left corner. The first row contains the numbers from to , the second row from n+1 to , and so on, continuing in this way until the grid is filled.

Petro is interested in the number of divisors each number has. Specifically, he highlights those numbers that have at most positive divisors by coloring their corresponding cells.

For example, if n = 7 and k = 3, the grid looks as follows:

8000.jpg

Help Petro by creating this grid. Use an asterisk («*») for highlighted (colored) cells and a dot («.») for unhighlighted ones.

Input

The input consists of two integers and (1 \leq n \leq 40, 1 \leq k \leq n^2).

Output

Print rows, each containing characters. Each character represents a cell in the grid: use «*» for highlighted cells and «.» for unhighlighted ones.

Examples

Example 1

Loading
Loading