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;
template <class F, class S>
ostream& operator<<(ostream& o, const pair<F, S>& p) {
  return o << "(" << p.first << ", " << p.second << ")";
}
template <class C>
void O__(ostream& o, const C& c) {
  bool f = 1;
  for (const auto& x : c) {
    if (!f) o << ", ";
    f = 0;
    o << x;
  }
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& v) {
  o << "[";
  O__(o, v);
  o << "]";
  return o;
}
template <class T, class V>
ostream& operator<<(ostream& o, const map<T, V>& v) {
  o << "{";
  O__(o, v);
  o << "}";
  return o;
}
template <class T>
ostream& operator<<(ostream& o, const set<T>& v) {
  o << "{";
  O__(o, v);
  o << "}";
  return o;
}
const double PI = 3.1415926535897932384626433832795;
const double EPS = 1e-9;
const int INF = (1 << 31) - 1;
const long long LLINF = (1LL << 63) - 1;
map<pair<int, int>, set<string>> tickets;
map<int, vector<int>> values;
template <class T>
void su(std::vector<T>& a) {
  sort((a).begin(), (a).end());
  a.erase(unique((a).begin(), (a).end()), a.end());
}
int m;
int LEN = 4;
vector<string> temp;
string sss;
void gen(int l) {
  if (temp.size() == m) return;
  if (l == 0) {
    temp.push_back(sss);
    return;
  }
  for (char d = '0'; d <= '9'; ++d) {
    sss += d;
    gen(l - 1);
    sss.resize(sss.size() - 1);
  }
}
set<string> solve(pair<int, int> p) {
  int k = p.second;
  int len = p.first;
  if (tickets.count(p)) return tickets[p];
  if (len <= LEN) return {};
  if (k < 0) return solve(pair<int, int>(len, -k));
  set<string> res;
  for (int first = 1; first < len; ++first) {
    if (res.size() == m) break;
    int second = len - first;
    if (first < second) continue;
    assert(second <= LEN);
    for (int secondValue : values[second]) {
      const set<string>& secondStrings =
          solve(pair<int, int>(second, secondValue));
      {
        if (res.size() == m) break;
        int firstValue = k - secondValue;
        const set<string>& firstStrings =
            solve(pair<int, int>(first, firstValue));
        for (const auto& x : firstStrings)
          for (const auto& y : secondStrings) {
            if (res.size() == m)
              goto stop;
            else
              res.insert(x + y);
            if (res.size() == m)
              goto stop;
            else
              res.insert(y + x);
          }
      stop:;
      }
      {
        if (res.size() == m) break;
        int firstValue = k + secondValue;
        const set<string>& firstStrings =
            solve(pair<int, int>(first, firstValue));
        for (const auto& x : firstStrings)
          for (const auto& y : secondStrings) {
            if (res.size() == m)
              goto stop1;
            else
              res.insert(x + y);
            if (res.size() == m)
              goto stop1;
            else
              res.insert(y + x);
          }
      stop1:;
      }
      if (secondValue > 0 && k % secondValue == 0) {
        if (res.size() == m) break;
        int firstValue = k / secondValue;
        const set<string>& firstStrings =
            solve(pair<int, int>(first, firstValue));
        for (const auto& x : firstStrings)
          for (const auto& y : secondStrings) {
            if (res.size() == m)
              goto stop2;
            else
              res.insert(x + y);
            if (res.size() == m)
              goto stop2;
            else
              res.insert(y + x);
          }
      stop2:;
      }
      if (k == 0 && secondValue == 0) {
        temp.clear();
        gen(second);
        const vector<string>& firstStrings = temp;
        for (const auto& x : firstStrings)
          for (const auto& y : secondStrings) {
            if (res.size() == m)
              goto stop3;
            else
              res.insert(x + y);
            if (res.size() == m)
              goto stop3;
            else
              res.insert(y + x);
          }
      stop3:;
      }
    }
  }
  return tickets[p] = res;
}
map<string, vector<int>> dp2;
vector<int> getK(string s) {
  if (dp2.count(s)) return dp2[s];
  if (s.size() == 1) {
    int d = s[0] - '0';
    vector<int> r(1, -d);
    if (d) r.push_back(d);
    return dp2[s] = r;
  }
  vector<int> c;
  for (int i = 1; i < s.size(); ++i) {
    vector<int> a = getK(s.substr(0, i));
    vector<int> b = getK(s.substr(i, s.size() - i));
    for (int x : a)
      for (int y : b) {
        c.push_back(x + y);
        c.push_back(x - y);
        c.push_back(x * y);
      }
  }
  sort((c).begin(), (c).end());
  c.erase(unique((c).begin(), (c).end()), c.end());
  return dp2[s] = c;
}
string tttt;
void doit(int len) {
  vector<int> c = getK(tttt);
  for (int x : c) {
    values[tttt.size()].push_back(x);
    tickets[pair<int, int>(tttt.size(), x)].insert(tttt);
  }
  if (len == 0) {
    return;
  }
  for (char d = '0'; d <= '9'; ++d) {
    tttt += d;
    doit(len - 1);
    tttt.resize(tttt.size() - 1);
  }
}
int main() {
  doit(LEN);
  for (auto& el : values) {
    su(el.second);
    random_shuffle((el.second).begin(), (el.second).end());
  }
  int k;
  cin >> k >> m;
  set<string> res = solve(pair<int, int>(8, k));
  cerr << "res.size()"
       << ": " << (res.size()) << "\n";
  ;
  for (auto& s : res) {
    if (m == 0) break;
    --m;
    cout << s << "\n";
  }
  std::cerr << 1.0 * clock() / CLOCKS_PER_SEC << "sec.\n";
  return 0;
}