Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/yulduzcha-romb

Star diamond

Medium 1000 ms 64 MB 47%
Share

An odd positive integer $n$ is given. Draw a diamond of height and width $n$ with stars (*): the middle line has $n$ stars, and every line above and below has two fewer. The stars of each line are centred: they are preceded by the needed number of spaces and followed by nothing.

A star diamond for n = 5: 5 in the middle, 3 above and below, 1 at the ends

Input

One odd positive integer $n$.

Output

$n$ lines — the diamond.

Note

$1 \le n \le 49$, $n$ is odd

Examples

Input #1
5
Output #1
  *
 ***
*****
 ***
  *
Input #2
1
Output #2
*

Sign in to submit a solution

Signing up is free and takes a minute.