#K58777. Triangle Pattern Generator

    ID: 30718 Type: Default 1000ms 256MiB

Triangle Pattern Generator

Triangle Pattern Generator

You are given a number of stones n and a list of n integers representing base lengths. For each stone, you need to generate a triangle pattern of numbers. For a given base length \(L\), the triangle has \(L\) rows, where the \(i^{th}\) row consists of \(L\) consecutive digits starting from \(i\) (each digit is computed modulo 10). For example, a triangle with a base length of 3 is generated as follows:

[ \begin{array}{c} 123 \ 234 \ 345 \end{array} ]

Your task is to read the input from standard input and produce the corresponding triangle patterns to standard output. If there are multiple stones, separate the triangle patterns with an empty line.

inputFormat

The first line contains an integer \(n\) representing the number of stones. The second line contains \(n\) space-separated integers where each integer denotes the base length for the corresponding stone.

Example:

3
2 3 4

outputFormat

For each stone, output its triangle pattern. Each row of the triangle should be printed on a separate line. If there are multiple stones, the triangles should be separated by an empty line. No extra spaces should be printed.

## sample
1
2
12

23

</p>