#include <bits/stdc++.h>
using namespace std;
int b[500], a[500];
int len(int x) {
  if (x < 10) return 1;
  if (x < 100) return 2;
  if (x < 1000) return 3;
}
int main() {
  int i, j, n;
  cin >> n;
  for (i = 0; i < n; i++) cin >> b[i];
  int now = 0;
  int sz = 0;
  for (i = 0; i < n; i++) {
    int d = b[i] - now;
    int l = 0;
    while (1) {
      if (l == sz) a[sz++] = 0;
      if (a[l] < 9 && d >= 1 && d <= 9 * l + 9 - a[l]) {
        d--, a[l]++;
        int q = 0;
        while (q < l) {
          if (d <= 9) {
            a[q] = d;
            break;
          }
          a[q] = 9;
          d = d - 9;
          q++;
        }
        if (q == l) a[l] += d;
        break;
      }
      d += a[l];
      a[l] = 0;
      l += 1;
    }
    now = b[i];
    for (j = sz - 1; j >= 0; j--) cout << a[j];
    cout << endl;
  }
  return 0;
}
