#include <bits/stdc++.h>
using namespace std;
vector<int> f(int i, int tmp) {
  vector<int> vec;
  vec.push_back(i);
  vec.push_back(-i);
  if (tmp > 1) {
    for (int run = 1, a = 10; run < tmp; run++, a *= 10) {
      vector<int> vec1 = f(i / a, tmp - run);
      vector<int> vec2 = f(i % a, run);
      for (int j = 0; j < vec1.size(); j++) {
        for (int b = 0; b < vec2.size(); b++) {
          vec.push_back(vec1[j] + vec2[b]);
          vec.push_back(vec1[j] * vec2[b]);
        }
      }
    }
  }
  sort(vec.begin(), vec.end());
  vector<int> Value;
  for (int j = 0; j < vec.size(); j++) {
    if (j == 0 || vec[j - 1] < vec[j]) {
      Value.push_back(vec[j]);
    }
  }
  return Value;
}
int main() {
  int n;
  int m;
  cin >> n >> m;
  for (int i = 0; i < 10000; i++) {
    vector<int> val = f(i, 4);
    for (int j = 0; j < val.size(); j++) {
      int tmp = n - val[j];
      if (0 <= tmp && tmp < 10000) {
        printf("%04d%04d\n", tmp, i);
        m--;
      }
      if (m == 0) {
        goto End;
      }
    }
  }
End:
  return 0;
}
