#K84867. Symmetric Pattern Generator
Symmetric Pattern Generator
Symmetric Pattern Generator
This problem requires you to generate an N x N symmetric grid pattern using the characters *
(asterisk) and space (
). The pattern is symmetric along both the vertical and horizontal axes. In other words, the grid satisfies the condition that the character at position \( (i, j) \) is the same as the character at position \( (j, i) \) and at positions \( (i, N-i-1) \) and \( (N-i-1, i) \). Specifically, place '*' on both the main diagonal and the secondary diagonal, and fill the remaining positions with spaces.
For example, when \( N=3 \), the output pattern will be:
* * * * *
inputFormat
The input is read from standard input (stdin) and consists of a single integer \( N \) denoting the size of the grid.
\( 1 \leq N \leq 1000 \)
outputFormat
Print the generated symmetric pattern grid to standard output (stdout). Each of the \( N \) lines should contain exactly \( N \) characters forming the pattern.
## sample1
*
</p>