#include <bits/stdc++.h>
using namespace std;
long long int n, m;
string a = "";
long long int count(string x) {
  long long int l = x.length();
  long long int i, sum = 0;
  for (i = 0; i < l; ++i) {
    sum += x[i] - '0';
  }
  return sum;
}
string nex(string x, long long int need) {
  long long int sum = 0;
  long long int i, j;
  long long int l = x.length();
  long long int r = count(x);
  for (i = 0; i < l; ++i) {
    sum += (x[i] - '0');
    if (sum >= need) break;
  }
  if (i != l) {
    if (i == 0) {
      x = "1";
      for (i = 0; i < l; ++i) x += "0";
    } else {
      x[i - 1]++;
      long long int rup = i;
      for (; i < l; ++i) x[i] = '0';
      rup--;
      while (x[rup] > '9') {
        if (rup == 0) break;
        x[rup] = '0';
        rup--;
        x[rup]++;
      }
      if (rup == 0 && x[rup] > '9') {
        x[rup] = '0';
        x = "1" + x;
      }
    }
  }
  sum = count(x);
  l = x.length();
  i = l;
  while (sum < need) {
    i--;
    if (i == -1) break;
    sum += (9 - (x[i] - '0'));
    x[i] = '9';
  }
  if (i >= 0) {
    x[i] -= (sum - need);
    return x;
  }
  string tem = "";
  while (sum < need) {
    tem += '9';
    sum += 9;
    if (sum >= need) break;
  }
  tem[0] -= (sum - need);
  tem += x;
  return tem;
}
int main() {
  ios_base::sync_with_stdio(0);
  long long int i, j, k;
  cin >> n;
  a = "0";
  for (i = 0; i < n; ++i) {
    cin >> m;
    a = nex(a, m);
    cout << a << endl;
  }
  return 0;
}
