402057: GYM100637 C Accounting Numeral System

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

Description

C. Accounting Numeral Systemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

The latest Accounting Numeral System is the top accounting system in the whole world. Its creator, Dr. Ceizenpok, is the best expert of the respective authority. Any positive integer n in this system based m is represented as a sum of m parts:

n = Cxmm + Cxm - 1m - 1 + Cxm - 2m - 2 + ... + Cx11, 

while x1, x2, ... , xm — are such integers that 0 ≤ x1 < x2 < ... < xm. Numbers our experts call accounting indexes. Each number n in this system is recorded as , and it is considered that 0! = 1 and Ckm = 0, if m > k. For example, number 9 in the accounting system based 3 is recorded as (4)(3)(2), because , and number 1 in this system based 2 looks like:(2)(0), because .

You have to find a representation of an integer n in the accounting numeral system based m.

Input

Single line contains two integers n and m (1 ≤ n ≤ 1016, 2 ≤ m ≤ 1 000).

Output

Single line should contain a sequence of m space-separated integers xm, ..., x2, x1, that form a number designation n in the accounting numeral system. Number xm is the leftmost digit in the number designation n, and x1 — its rightmost one.

ExamplesInput
9 3
Output
4 3 2 
Input
5 2
Output
3 2 

加入题单

算法标签: