#K5456. Generate a Good Sequence

    ID: 29780 Type: Default 1000ms 256MiB

Generate a Good Sequence

Generate a Good Sequence

In this problem, you are given two integers (n) and (k). Your task is to generate a "good sequence" of length (n) using integers from 1 to (k) following a simple cyclic pattern. In other words, the (i)-th element of the sequence should be ((i \bmod k) + 1). This scheme guarantees that the frequency of any integer (x) (with (1 \le x < k)) does not exceed the frequency of (x+1).


Example:
For (n = 5) and (k = 3), the generated sequence should be: 1 2 3 1 2.

inputFormat

The input consists of a single line containing two space-separated integers (n) and (k), where (n) is the length of the sequence to generate and (k) is the maximum integer allowed in the sequence.

outputFormat

Output a single line containing (n) space-separated integers forming the good sequence as described above.## sample

5 3
1 2 3 1 2

</p>