Numbers *k*-bonacci (*k* is integer, *k* &gt; 1) are a generalization of Fibonacci numbers and are determined as follows:
 -  *F*(*k*, *n*) = 0, for integer *n*, 1 ≤ *n* &lt; *k*; -  *F*(*k*, *k*) = 1; -  *F*(*k*, *n*) = *F*(*k*, *n* - 1) + *F*(*k*, *n* - 2) + ... + *F*(*k*, *n* - *k*), for integer *n*, *n* &gt; *k*. 
Note that we determine the *k*-bonacci numbers, *F*(*k*, *n*), only for integer values of *n* and *k*.

You've got a number *s*, represent it as a sum of several (at least two) distinct *k*-bonacci numbers.
The first line contains two integers *s* and *k* (1 ≤ *s*, *k* ≤ 10<sup class="upper-index">9</sup>; *k* &gt; 1).
"""
    Template written to be used by Python Programmers.
    Use at your own risk!!!!
    Owned by enraged(rating - 5 star at CodeChef and Specialist at Codeforces).
"""
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest, nsmallest, _heapify_max, _heapreplace_max
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as c
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
# sys.setrecursionlimit(2*pow(10, 6))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(var): sys.stdout.write(str(var))
def outln(var): sys.stdout.write(str(var)+"\n")
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


def k_bonacci(n):
    if n < k:
        return 0
    if n == k:
        return 1
    if n in dp.keys():
        return dp[n]
    dp[n] = 0
    for i in range(n-k, n):
        dp[n] += k_bonacci(i)
    return dp[n]


s, k = sp()
answer = []
if k <= 32:
    dp = dd(int)
    i = 1
    while True:
        dp[i] = k_bonacci(i)
        if dp[i] >= pow(10, 9):
            break
        i += 1
    arr = list(dp.values())
    while s > 0:
        temp = bl(arr, s)
        if arr[temp] > s:
            temp -= 1
        s -= arr[temp]
        answer.append(arr[temp])
else:
    i = 32
    while i >= 0 and s > 0:
        if pow(2, i) <= s:
            s -= pow(2, i)
            answer.append(pow(2, i))
        i -= 1
if len(answer) < 2:
    answer.insert(0, 0)
print(*answer)
