#include <bits/stdc++.h>
using namespace std;
const int INF = (-1u) / 2;
const long long int INF2 = (-1ull) / 2;
int a[310], b[310], i, d[310][310], j, k, n, m,
    timer = 0, l, r, x, y, len, prevv[310], now[310], mx[310], mn[310];
int c[1011000], cnt = 0, fl = 0, a2, a3 = -1000000, ans = 0, res[1110];
deque<int> v;
deque<int>::iterator it;
void doo(int id, int len, int sum, int st) {
  if (id == len) return;
  int x = st;
  for (; x < 10; x++) {
    if ((len - id - 1) * 9 >= sum - x) {
      v[id] = x;
      doo(id + 1, len, sum - x, 0);
      return;
    }
  }
}
int main() {
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &c[i]);
  }
  x = c[0];
  while (x > 0) {
    v.push_back(min(x, 9));
    x -= min(x, 9);
  }
  sort(v.begin(), v.end());
  for (i = 0; i < v.size(); i++) cout << v[i];
  cout << endl;
  for (i = 1; i < n; i++) {
    cnt = 0;
    for (j = 0; j < v.size(); j++) {
      cnt += v[j];
    }
    k = v.size();
    for (j = k - 1; j >= 0; j--) {
      if (cnt >= c[i] || c[i] > (cnt - v[j] + (k - j) * 9) || v[j] == 9) {
        cnt -= v[j];
        if (j == 0) {
          j = 1;
          k++;
          v.push_front(0);
        }
        continue;
      }
      cnt -= v[j];
      c[i] -= cnt;
      doo(j, k, c[i], v[j] + 1);
      break;
    }
    for (j = 0; j < v.size(); j++) cout << v[j];
    cout << endl;
  }
  return 0;
}
