#C8488. Assign Parking Spaces

    ID: 52475 Type: Default 1000ms 256MiB

Assign Parking Spaces

Assign Parking Spaces

You are given a multi-level parking structure. In each level, there are a fixed number of parking spaces. Your task is to assign parking spaces to incoming cars in the order in which the parking spaces are filled.

For each test case, you are provided with three integers:

  • L: The number of levels in the parking structure.
  • S: The number of parking spaces per level.
  • C: The number of cars that need parking.

The parking spaces are labeled in the format \(Lx\)-\(Sy\), where \(x\) represents the level number and \(y\) represents the space number within that level. The assignment is performed in a row-wise manner: fill all spaces on the first level (from 1 to S), then proceed to the next level and so on. You can assume that the total number of parking spaces in the structure is sufficient to accommodate all cars.

Input Format: The first line contains an integer \(T\) representing the number of test cases. For each test case, there is a single line containing three integers: \(L\), \(S\), and \(C\), separated by spaces.

Output Format: For each test case, output a single line containing the parking space identifiers assigned to the cars in order, separated by a single space.

Example:

Input:
1
3 4 5

Output: L1-S1 L1-S2 L1-S3 L1-S4 L2-S1

</p>

inputFormat

The first line of input contains an integer \(T\) representing the number of test cases. Each test case consists of a single line with three space-separated integers \(L\) (the number of levels), \(S\) (the number of parking spaces per level), and \(C\) (the number of cars).

outputFormat

For each test case, output a single line with the parking space identifiers in the order the cars are parked. Each identifier is formatted as \(Lx-Sy\), where \(x\) is the level number and \(y\) is the space number. The identifiers should be separated by a single space.

## sample
1
3 4 5
L1-S1 L1-S2 L1-S3 L1-S4 L2-S1

</p>