#include <bits/stdc++.h>
using namespace std;
int a, b, c, d, e, f, g, h, i, j, k;
set<int> E;
int target, need;
void soso(int x, int y) {
  if (y == 0) {
    int Left = abs(abs(x) - target);
    if (Left >= 10000) return;
    if (E.size() < need) E.insert(Left * 10000 + i);
    if (E.size() < need) E.insert(i * 10000 + Left);
    return;
  }
  soso(x + (y % 10), y / 10);
  soso(x - (y % 10), y / 10);
  soso(x * (y % 10), y / 10);
}
int main() {
  cin >> target >> need;
  for (i = 0; i < 10000; i++) soso(i % 10, i / 10);
  for (set<int>::iterator it = E.begin(); it != E.end(); it++)
    printf("%08d\n", *it);
  return 0;
}
