Under construction

Still being built. Things may change

Ladder of Numbers

Time limit1sMemory limit1024 MB

Summary
Numbers are written in a staircase with row r holding r numbers, and only the first k of each row remain; print rows a through b.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Valentin writes the natural numbers starting from 1 in a staircase shape: one number on the first row, two on the second, three on the third, and so on.

1
2 3
4 5 6
7 8 9 10
...

Then he erases every number on each row except the first kk. If a row has fewer than kk numbers, he keeps all of them.

You are given integers aa, bb, and kk. Print rows aa through bb as they remain after Valentin's erasing.

Input

The first line contains aa, the second line contains bb, and the third line contains kk. (1≤a≤b≤1091 \le a \le b \le 10^9, b−a≤100b - a \le 100, 1≤k≤1001 \le k \le 100)

Output

Print rows aa through bb that remain after Valentin's erasing. Separate the numbers in each row with spaces.

Examples1

  1. Example 1

    Input
    1
    5
    3
    
    Expected output
    1
    2 3
    4 5 6
    7 8 9
    11 12 13