#include <bits/stdc++.h>
using namespace std;
const int maxn = 600 + 5;
const int mo = 1e9 + 7;
int readint() {
  int x = 0, f = 1;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    (s = getchar());
  }
  while (s >= '0' && s <= '9') {
    x = (x << 3) + (x << 1) + (s ^ 48);
    (s = getchar());
  }
  return x * f;
}
int b[maxn], len, a[maxn];
void getmina(int x) {
  int now = 1;
  while (x) {
    while (a[now] < 9 && x) {
      x--;
      a[now]++;
    }
    if (now > len && x == 0) len = now;
    now++;
  }
}
void printa() {
  for (int i = len; i >= 1; i--) {
    printf("%d", a[i]);
  }
  puts("");
}
int main() {
  int n = readint();
  for (int i = 1; i <= n; i++) {
    b[i] = readint();
  }
  getmina(b[1]);
  printa();
  for (int i = 2; i <= n; i++) {
    int delta = b[i] - b[i - 1];
    if (delta > 0) {
      getmina(delta);
      printa();
    } else {
      int k = 1;
      while (1) {
        if (k > len) len = k;
        if (a[k] < 9 && delta > 0) {
          a[k]++;
          getmina(delta - 1);
          printa();
          break;
        }
        delta += a[k];
        a[k] = 0;
        k++;
      }
    }
  }
  return 0;
}
