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).
def arr(s,k):
    x=[]
    n=0
    while(F(k,n)<=s):
       x.append(F(k,n))
       n+=1
    return x
def F(k,n):
    if n<k:
        return 0
    elif n==k:
        return 1
    else:
        return g(k,n)
def g(k,n):
    sumi=0
    for z in range(1,k+1):
        sumi+=F(k,n-z)
    return sumi
s,k=list(map(int,input().split()))
x=arr(s,k)
x=list(set(x))
x.sort()
ans=[]
for z1 in reversed(range(len(x))):
    if x[z1]<=s:
        s-=x[z1]
        x[z1]=str(x[z1])
        ans.append(x[z1])
print(len(ans))
x=" ".join(ans)
print(x)