arranging-goodies

Now as I fest is on the way to start Coordinators of different events are busy in purchasing Goodies for the winners. But the coordinators just dispersed all the goodies in the management room due to limited time available to them.

To arrange the Goodies Aman was assigned the job to gather the goodies and sort them into baskets. Overall there are n goodies and m baskets. The baskets are in a row from left to right and they are numbered with numbers from 1 to m, correspondingly. All the goodies have numbers from 1 to n written on them.

Aman decided to sort the goodies in the order of increasing of their numbers by the following scheme. He will put each new goodie in the basket with the least number of goodies. And if he's got several   baskets, he chooses the basket which stands closer to the middle i.e. he chooses the basket for which    |(m+1)/2-i|  is minimum, where i is the number of the basket. If in this case Aman still has more than one basket then he chooses the basket with the minimum number.

For every goodie print the number of the basket where it will go according to Aman's scheme.

Note that the goodie are sorted into baskets in the order of increasing numbers, that is, the first goodie goes first, then goes the second goodie and so on.

Input

The first line contains two space-separated integers n, m (1 ≤ n,m ≤ 10^5) -the number of goodies and baskets, correspondingly.

Output

Print n numbers, one per line. The i-th line must contain  basket  number  for the goodie numbered i.

SAMPLE INPUT
4 3

SAMPLE OUTPUT
2
1
3
2

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
n, m = list(map(int, input().split()))
a = []
mid = (m+1)/2
a.append(mid)
if m % 2 == 0 :
	for i in range(1, mid) :
		a.append(mid + i)
		a.append(mid - i)
	a.append(m)
else :
	for i in range(1, mid) :
		a.append(mid - i)
		a.append(mid + i)
for i in range(n) :
	print(a[i%m])