405095: GYM101790 E Test variants

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Test variantstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

N students in the class room are seated in a row. Let a number of the variant of the test for i-th student is Ai (1 ≤ i ≤ N).

To prevent writing off from each other, the numbers of test variant for all adjacent students should be different. Formaly the following condition must be fulfilled: Ai ≠ Ai - 1 for all i > 1.

The quality control of education at the institute is testing. When the examiner enters the audience, he writes out the variants of each K-th student, starting with certain student, which is unknown. A check is considered successful if all written variants are different. Thus, in order to be guaranteed to pass the test, it is necessary to satisfy the condition Ai ≠ Aj for all .

Help the professor to find such a distribution of test variants from 1 to V among N students, where they can not write off from each other, the quality control of education will be successfully passed and the number V will be the lowest possible.

Input

The first ans only line containts two integers N and K (1 ≤ K ≤ N ≤ 105).

Output

Dispaly N numbers: the distribution of numbers of test variants among all students, according to above conditions. If there are several possible answers, choose any.

ExamplesInput
4 3
Output
1 2 1 2
Input
5 2
Output
3 1 2 3 1
Input
3 1
Output
1 2 3

加入题单

算法标签: