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;
const int MOD = (int)1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int)1e9 + 23111992;
const long long LINF = (long long)1e18 + 23111992;
const long double PI = acos((long double)-1);
const long double EPS = 1e-9;
inline long long gcd(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline long long fpow(long long n, long long k, int p = MOD) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
template <class T>
inline int chkmin(T& a, const T& val) {
  return val < a ? a = val, 1 : 0;
}
template <class T>
inline int chkmax(T& a, const T& val) {
  return a < val ? a = val, 1 : 0;
}
inline unsigned long long isqrt(unsigned long long k) {
  unsigned long long r = sqrt(k) + 1;
  while (r * r > k) r--;
  return r;
}
inline long long icbrt(long long k) {
  long long r = cbrt(k) + 1;
  while (r * r * r > k) r--;
  return r;
}
inline void addmod(int& a, int val, int p = MOD) {
  if ((a = (a + val)) >= p) a -= p;
}
inline void submod(int& a, int val, int p = MOD) {
  if ((a = (a - val)) < 0) a += p;
}
inline int mult(int a, int b, int p = MOD) { return (long long)a * b % p; }
inline int inv(int a, int p = MOD) { return fpow(a, p - 2, p); }
inline int sign(long double x) { return x < -EPS ? -1 : x > +EPS; }
inline int sign(long double x, long double y) { return sign(x - y); }
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int mrand() { return abs((int)mt()); }
inline int mrand(int k) { return abs((int)mt()) % k; }
void chemthan() {
  int k, m;
  cin >> k >> m;
  set<string> res;
  for (int i = (0); i < (5e4); ++i) {
    int j = abs(i - k);
    auto check = [&](int u, int v) {
      int uu = i / u;
      int vv = j / v;
      int res =
          (int)(to_string(u) + to_string(uu) + to_string(v) + to_string(vv))
              .size();
      if (uu <= 1) res--;
      if (vv <= 1) res--;
      return res;
    };
    auto cc = [&](int u, int uu, int v, int vv) {
      int k = 8 - int((to_string(u)).size()) - int((to_string(uu)).size()) -
              int((to_string(v)).size()) - int((to_string(vv)).size());
      if (uu == 1) k++;
      if (vv == 1) k++;
      for (int msk = (0); msk < (1 << k); ++msk) {
        for (int i1 = (0); i1 < (k + 1); ++i1)
          for (int i2 = (0); i2 < (k - i1 + 1); ++i2)
            for (int i3 = (0); i3 < (k - i1 - i2 + 1); ++i3)
              for (int i4 = (0); i4 < (k - i1 - i2 - i3 + 1); ++i4) {
                int i5 = k - i1 - i2 - i3 - i4;
                vector<int> vw;
                for (int i = (0); i < (k); ++i)
                  vw.push_back((((msk) >> (i)) & 1));
                string s;
                for (int j = (0); j < (i1); ++j) {
                  s += char('0' + vw.back());
                  vw.pop_back();
                }
                s += to_string(u);
                for (int j = (0); j < (i2); ++j) {
                  s += char('0' + vw.back());
                  vw.pop_back();
                }
                if (1 < uu) {
                  s += to_string(uu);
                }
                for (int j = (0); j < (i3); ++j) {
                  s += char('0' + vw.back());
                  vw.pop_back();
                }
                s += to_string(v);
                for (int j = (0); j < (i4); ++j) {
                  s += char('0' + vw.back());
                  vw.pop_back();
                }
                if (1 < vv) {
                  s += to_string(vv);
                }
                for (int j = (0); j < (i5); ++j) {
                  s += char('0' + vw.back());
                  vw.pop_back();
                }
                res.insert(s);
                if (int((res).size()) == m) {
                  for (auto e : res) {
                    cout << e << "\n";
                  }
                  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC
                       << "ms\n";
                  exit(0);
                }
              }
      }
    };
    for (int u = 1; u * u <= i; u++) {
      if (i % u == 0) {
        for (int v = 1; v * v <= j; v++) {
          if (j % v == 0) {
            int t = check(u, v);
            if (t <= 8) {
              int uu = i / u;
              int vv = j / v;
              for (int msk = (0); msk < (1 << 3); ++msk) {
                int ar[] = {u, uu, v, vv};
                if ((((msk) >> (0)) & 1)) {
                  if (ar[0] == ar[1]) {
                    continue;
                  }
                  swap(ar[0], ar[1]);
                }
                if ((((msk) >> (1)) & 1)) {
                  if (ar[2] == ar[3]) {
                    continue;
                  }
                  swap(ar[2], ar[3]);
                }
                if ((((msk) >> (2)) & 1)) {
                  if (ar[0] == ar[2] && ar[1] == ar[3]) {
                    continue;
                  }
                  swap(ar[0], ar[2]);
                  swap(ar[1], ar[3]);
                }
                cc(ar[0], ar[1], ar[2], ar[3]);
                if (t < 8) {
                  for (int c = (1); c < (10); ++c) {
                    for (int i = (0); i < (4); ++i)
                      if (c <= ar[i] % 10) {
                        int t = ar[i];
                        ar[i] = (ar[i] - c) * 10 + c;
                        for (int d = (1); d < (10); ++d) {
                          for (int j = (i + 1); j < (4); ++j)
                            if (d <= ar[j] % 10) {
                              int tt = ar[j];
                              ar[j] = (ar[j] - d) * 10 + d;
                              cc(ar[0], ar[1], ar[2], ar[3]);
                              ar[j] = tt;
                            }
                        }
                        cc(ar[0], ar[1], ar[2], ar[3]);
                        ar[i] = t;
                      }
                    for (int i = (0); i < (4); ++i)
                      if (ar[i] % 10 + c < 10) {
                        int t = ar[i];
                        ar[i] = (ar[i] + c) * 10 + c;
                        cc(ar[0], ar[1], ar[2], ar[3]);
                        ar[i] = t;
                      }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  cerr << "["
       << "sz(res)"
       << ": " << (int((res).size())) << "] ";
  cerr << "\n";
  ;
}
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(0), cin.tie(0);
  if (argc > 1) {
    assert(freopen(argv[1], "r", stdin));
  }
  if (argc > 2) {
    assert(freopen(argv[2], "wb", stdout));
  }
  chemthan();
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}