Problem: Gerald has a friend, Pollard. Pollard is interested in lucky tickets (ticket is a sequence of digits). At first he thought that a ticket is lucky if between some its digits we can add arithmetic signs and brackets so that the result obtained by the arithmetic expression was number 100. But he quickly analyzed all such tickets and moved on to a more general question. Now he explores k-lucky tickets.

Pollard sais that a ticket is k-lucky if we can add arithmetic operation signs between its digits to the left or right of them (i.e., "+", "-", " × ") and brackets so as to obtain the correct arithmetic expression whose value would equal k. For example, ticket "224201016" is 1000-lucky as ( - 2 - (2 + 4)) × (2 + 0) + 1016 = 1000.

Pollard was so carried away by the lucky tickets that he signed up for a seminar on lucky tickets and, as far as Gerald knows, Pollard will attend it daily at 7 pm in some famous institute and will commute to it in the same tram for m days. In this tram tickets have eight digits. And Gerald wants to make a surprise for Pollard: each day Pollard will receive a tram k-lucky ticket. The conductor has already agreed to give Pollard certain tickets during all these m days and he only wants Gerald to tell him what kind of tickets to give out. In this regard, help Gerald pick exactly m distinct k-lucky tickets.

Input

The single line contains two integers k and m (0 ≤ k ≤ 104, 1 ≤ m ≤ 3·105).

Output

Print m lines. Each line must contain exactly 8 digits — the k-winning ticket. The tickets may begin with 0, all tickets must be distinct. If there are more than m distinct k-lucky tickets, print any m of them. It is guaranteed that at least m distinct k-lucky tickets exist. The tickets can be printed in any order.

Examples

Input

0 3


Output

00000000
00000001
00000002


Input

7 4


Output

00000007
00000016
00000017
00000018

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j, k, l, s, tot, q[100];
  while (scanf("%d %d", &n, &m) != EOF) {
    for (i = 0; i <= 9; i++)
      for (j = 0; j <= 9; j++)
        for (k = 0; k <= 9; k++)
          for (l = 0; l <= 9; l++) {
            q[0] = i - j - k - l;
            q[1] = i + j + k + l;
            q[2] = i - j + k + l;
            q[3] = i + j - k + l;
            q[4] = i + j + k - l;
            q[5] = i - j - k + l;
            q[6] = i - j + k - l;
            q[7] = i + j - k - l;
            q[8] = i * j + k + l;
            q[9] = i * j - k - l;
            q[10] = i * j - k + l;
            q[11] = i * j + k - l;
            q[12] = 10 * i + j + k + l;
            q[13] = 10 * i + j - k - l;
            q[14] = 10 * i + j - k + l;
            q[15] = 10 * i + j + k - l;
            q[16] = i + j * k + l;
            q[17] = i - j * k + l;
            q[18] = i - j * k - l;
            q[19] = i + j * k - l;
            q[20] = i + j + k * l;
            q[21] = i - j + k * l;
            q[22] = i - j - k * l;
            q[23] = i + j - k * l;
            q[24] = i + 10 * j + k + l;
            q[25] = i - (10 * j + k) + l;
            q[26] = i - (10 * j + k) - l;
            q[27] = i + 10 * j + k - l;
            q[28] = i + j + 10 * k + l;
            q[29] = i - j + 10 * k + l;
            q[30] = i - j - (10 * k + l);
            q[31] = i + j - (10 * k + l);
            q[32] = i * j + k * l;
            q[33] = i * j - k * l;
            q[34] = 10 * i + j + k * l;
            q[35] = 10 * i + j - k * l;
            q[36] = i * j + 10 * k + l;
            q[37] = i * j - (10 * k + l);
            q[38] = 10 * i + j + 10 * k + l;
            q[39] = 10 * i + j - (10 * k + l);
            q[40] = i * j * k + l;
            q[41] = i * j * k - l;
            q[42] = i + j * k * l;
            q[43] = i - j * k * l;
            q[44] = 100 * i + 10 * j + k + l;
            q[45] = 100 * i + 10 * j + k - l;
            q[46] = i + 100 * j + 10 * k + l;
            q[47] = i - (100 * j + 10 * k + l);
            q[48] = i * j * k * l;
            q[49] = 1000 * i + 100 * j + 10 * k + l;
            for (s = 0; s < 50; s++) q[s] = abs(q[s]);
            sort(q, q + 50);
            tot = unique(q, q + 50) - q;
            s = 0;
            if (m && (q[0] == 0) && (n != 10000))
              printf("%04d%d%d%d%d\n", n, i, j, k, l), m--, s++;
            if (q[0] == 0) s = 1;
            for (; s < tot; s++) {
              if (m && (n + q[s] < 10000))
                printf("%04d%d%d%d%d\n", n + q[s], i, j, k, l), m--;
              if (m && (n - q[s] >= 0))
                printf("%04d%d%d%d%d\n", n - q[s], i, j, k, l), m--;
            }
            if (m == 0) goto NextCase;
          }
  NextCase:;
  }
  return 0;
}