A depot assigns n parcel ids to m lanes numbered 0 to m-1; a parcel with id x belongs to lane x mod m. Produce the ids sorted primarily by lane number (ascending) and, within the same lane, by ascending id. This is exactly the order you get by concatenating lane 0's sorted ids, then lane 1's, and so on. Output the resulting sequence.
Input format
Line 1: two integers n and m.
Line 2: n space-separated non-negative integers, the parcel ids.
Output format
n space-separated integers on one line: the ids in the described order.
Constraints
- 1 ≤ n ≤ 100000
- 1 ≤ m ≤ 1000
- 0 ≤ id ≤ 1000000000