#include <bits/stdc++.h>
using namespace std;
int a[310][355];
int main() {
  int i, n, b[310], s, k, j;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) scanf("%d", &b[i + 1]);
  b[0] = 0;
  for (j = 0; j <= 350; ++j) a[0][j] = 0;
  for (i = 1; i <= n; ++i) {
    s = b[i - 1];
    for (j = 0; j <= 350; ++j) {
      a[i][j] = a[i - 1][j];
    }
    j = 0;
    while (a[i][j] == 9) {
      a[i][j] = 0;
      s -= 9;
      j++;
    }
    a[i][j]++;
    s++;
    if (s < b[i]) {
      j = 0;
      while (s < b[i]) {
        s = s + 9 - a[i][j];
        a[i][j] = 9;
        j++;
      }
      j--;
      a[i][j] = a[i][j] - (s - b[i]);
    } else if (s > b[i]) {
      j = 0;
      while (s > b[i]) {
        s = s - a[i][j];
        a[i][j] = 0;
        k = j + 1;
        while (a[i][k] == 9) {
          a[i][k] = 0;
          k++;
          s -= 9;
        }
        a[i][k]++;
        s++;
        j++;
      }
      j = 0;
      while (s < b[i]) {
        s = s + 9 - a[i][j];
        a[i][j] = 9;
        j++;
      }
      j--;
      a[i][j] = a[i][j] - (s - b[i]);
    }
  }
  for (i = 1; i <= n; ++i) {
    j = 350;
    while (j >= 0 && a[i][j] == 0) j--;
    for (; j >= 0; --j) printf("%d", a[i][j]);
    printf("\n");
  }
}
