#include <bits/stdc++.h>
using namespace std;
int v[100100];
bool used[100100];
int maxi;
int main() {
  int n, last = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int num;
    scanf("%d", &num);
    if (num > last) {
      int m = num - last;
      int pos = 0;
      while (m) {
        if (v[pos] < 9) {
          int t = min(9 - v[pos], m);
          v[pos] += t;
          maxi = max(maxi, pos);
          m -= t;
        }
        pos++;
      }
    } else {
      int m = last - num + 1;
      int acc = 0;
      int pos = 0;
      while (m) {
        if (v[pos]) {
          if (v[pos] <= m) {
            m -= v[pos];
            v[pos] = 0;
          } else {
            v[pos] -= m;
            m = 0;
            acc += v[pos];
            v[pos] = 0;
          }
        }
        pos++;
      }
      while (v[pos] == 9) {
        v[pos] = 0;
        acc += 9;
        pos++;
      }
      v[pos]++;
      maxi = max(maxi, pos);
      pos = 0;
      while (acc) {
        v[pos] = min(9, acc);
        acc -= v[pos];
        pos++;
      }
    }
    for (int i = maxi; i >= 0; i--) {
      printf("%d", v[i]);
    }
    printf("\n");
    last = num;
  }
  return 0;
}
