PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#CCBCHBA0000078. Hình vuông dấu cộng (Plus Sign Square)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Hình vuông dấu cộng (Plus Sign Square)

Plus Sign Square

Source: Phước Hưng OJ

Problem Statement

Given side length n, print n lines, each containing exactly n consecutive plus sign characters, without spaces.

Input

One line containing exactly one integer n.

Output

Print exactly the required output described above. Do not print prompts, extra characters, or blank lines. For numerical rows, separate adjacent values with a single space and no trailing space.

Subtasks

  • Subtask 1 (20%): 1 <= n <= 3.
  • Subtask 2 (30%): 1 <= n <= 10.
  • Subtask 3 (50%): 1 <= n <= 30.

Examples

Example 1

Input:

2

Output:

++
++

Explanation:

Two rows, with two plus signs in each.

Example 2

Input:

1

Output:

+

Explanation:

The smallest square has one plus sign.