#include <bits/stdc++.h>
using namespace std;
const int MAXN = 305;
int b[MAXN], stk[MAXN << 2], sz;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= n; i++) {
    int x = b[i];
    if (i == 1) {
      while (x) {
        stk[sz++] = min(x, 9);
        x -= min(x, 9);
      }
    } else {
      int temp = b[i - 1];
      int ok = 0;
      for (int j = 0; j < sz; j++) {
        if (stk[j] < 9 && x > temp && x - temp <= 9 * j + 9 - stk[j]) {
          int res = x - temp - 1;
          stk[j]++;
          int id = 0;
          while (id < j) {
            stk[id++] = min(res, 9);
            res -= min(res, 9);
          }
          if (res > 0) stk[j] += res;
          ok = 1;
          break;
        }
        temp -= stk[j];
      }
      if (ok == 0) {
        for (int j = sz;; j++) {
          if ((j + 1) * 9 >= x) {
            stk[j] = 1;
            x--;
            int id = 0;
            while (id < j) {
              stk[id++] = min(x, 9);
              x -= min(x, 9);
            }
            if (x) {
              stk[j] += x;
            }
            sz = j + 1;
            break;
          }
        }
      }
    }
    for (int j = sz - 1; j >= 0; j--) printf("%d", stk[j]);
    puts("");
  }
  return 0;
}
