Preparando MOJI

Little Pony and Crystal Mine

1000ms 262144K

Description:

Twilight Sparkle once got a crystal from the Crystal Mine. A crystal of size n (n is odd; n > 1) is an n × n matrix with a diamond inscribed into it.

You are given an odd integer n. You need to draw a crystal of size n. The diamond cells of the matrix should be represented by character "D". All other cells of the matrix should be represented by character "*". Look at the examples to understand what you need to draw.

Input:

The only line contains an integer n (3 ≤ n ≤ 101; n is odd).

Output:

Output a crystal of size n.

Sample Input:

3

Sample Output:

*D*
DDD
*D*

Sample Input:

5

Sample Output:

**D**
*DDD*
DDDDD
*DDD*
**D**

Sample Input:

7

Sample Output:

***D***
**DDD**
*DDDDD*
DDDDDDD
*DDDDD*
**DDD**
***D***

Informação

Codeforces

Provedor Codeforces

Código CF454A

Tags

implementation

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:53:03

Relacionados

Nada ainda