#include <bits/stdc++.h>
using namespace std;
int n, m;
set<int> ans;
set<int>::iterator it;
vector<int> v;
void print() {
  vector<int> p;
  int wh = 0;
  for (it = ans.begin(); it != ans.end() && wh < m; it++) {
    int b = *it;
    p.clear();
    while (b > 0) {
      p.push_back(b % 10);
      b /= 10;
    }
    for (int i = p.size() - 2; i >= 0; i--) printf("%d", p[i]);
    puts("");
    wh++;
  }
  exit(0);
}
int dis(long long x) {
  int ans = 0;
  while (x > 0) {
    ans++;
    x /= 10;
  }
  return ans;
}
int __union__(vector<int> h) {
  int d = 0;
  for (int i = 0; i < h.size(); i++) {
    int p = dis(h[i]);
    for (int j = 0; j < p; j++) d *= 10;
    d += h[i];
  }
  return d;
}
void rec_add(vector<int> p, int c, int l) {
  if (c == 0) {
    ans.insert(__union__(p));
    return;
  }
  for (int i = l; i < p.size(); i++) {
    p[i] *= 10;
    rec_add(p, c - 1, i);
    p[i] /= 10;
  }
}
bool add(vector<int> p) {
  long long c = -1;
  for (int i = 0; i < p.size(); i++) c += dis(p[i]);
  if (c > 8) return false;
  rec_add(p, 8 - c, 0);
  return true;
}
bool rec(int x) {
  if (v.size() > 9) return false;
  if (!add(v)) return false;
  if (ans.size() >= m) print();
  for (int i = 1; i < v.size(); i++)
    if (x != i) {
      v.insert(v.begin() + i + 1, 0);
      int fi = v[i];
      for (int j = 1; j < v[i]; j++) {
        int p1 = v[i] - j, p2 = j;
        v[i] = p1;
        v[i + 1] = p2;
        if (!rec(i)) break;
        swap(v[i], v[i + 1]);
        if (!rec(i)) break;
        v[i] = fi;
      }
      v[i] = fi;
      for (int j = 1; j <= 10000; j++) {
        int p1 = v[i] + j, p2 = j;
        v[i] = p1;
        v[i + 1] = p2;
        if (!rec(i)) break;
        swap(v[i], v[i + 1]);
        if (!rec(i)) break;
        v[i] = fi;
      }
      v[i] = fi;
      v.erase(v.begin() + i + 1);
    }
  return true;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i < 10000; i++) {
    v.clear();
    v.push_back(1);
    v.push_back(i + n);
    v.push_back(i);
    rec(0);
    swap(v[1], v[2]);
    rec(0);
  }
  print();
  return 0;
}
