#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double eqs = 1e-9;
int b[400], len;
int a[1000], c[1000];
int main() {
  int n, i, j, x, cnt, sum;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; i++) {
      scanf("%d", &b[i]);
    }
    x = b[0];
    cnt = 0;
    memset(a, 0, sizeof(a));
    while (x) {
      if (x >= 9) {
        x -= 9;
        c[cnt++] = 9;
      } else {
        c[cnt++] = x;
        x = 0;
      }
    }
    for (i = cnt - 1; i >= 0; i--) {
      printf("%d", c[i]);
      a[i] = c[i];
    }
    len = cnt;
    puts("");
    for (i = 1; i < n; i++) {
      if (b[i] > b[i - 1]) {
        x = b[i] - b[i - 1];
        for (j = 0;; j++) {
          if (9 - a[j] >= x) {
            a[j] += x;
            x = 0;
          } else {
            x -= 9 - a[j];
            a[j] = 9;
          }
          if (!x) break;
        }
        len = max(j + 1, len);
      } else {
        x = b[i - 1] - b[i];
        sum = 0;
        int pos, y;
        for (j = 0;; j++) {
          if (sum + a[j] > x) {
            pos = j + 1;
            a[j] = 0;
            break;
          } else {
            sum += a[j];
            a[j] = 0;
          }
        }
        while (a[pos] == 9) {
          pos++;
        }
        a[pos]++;
        x = 0;
        for (j = len - 1; j > pos; j--) {
          x += a[j];
        }
        x = b[i] - a[pos] - x;
        for (j = 0; j < pos; j++) {
          if (x > 9) {
            a[j] = 9;
            x -= 9;
          } else {
            a[j] = x;
            x = 0;
          }
        }
        len = max(pos + 1, len);
      }
      for (j = len - 1; j >= 0; j--) {
        printf("%d", a[j]);
      }
      puts("");
    }
  }
  return 0;
}
