#include <bits/stdc++.h>
using namespace std;
bool comp(const string& x, const string& y) {
  if (x.size() != y.size()) return x.size() < y.size();
  for (int i = 0; i != x.size(); ++i)
    if (x[i] != y[i]) return x[i] < y[i];
  return false;
}
string cons(int x, const string& y) {
  string res;
  for (int i = 0; true; ++i) {
    string z;
    if (i >= y.size())
      z = string(i + 1 - y.size(), '0') + y;
    else
      z = y;
    int n = z.size();
    if (z[n - i - 1] == '9') continue;
    int sum = x;
    for (int j = i + 1; j != n; ++j) sum -= (z[n - j - 1] - '0');
    for (int j = 0; j != i; ++j) z[n - j - 1] = '0';
    res = z;
    res[n - i - 1]++;
    sum -= (res[n - i - 1] - '0');
    for (int j = 0; j != i; ++j) {
      if (sum > 0) {
        int c = min(sum, 9);
        res[n - j - 1] = ('0' + c);
        sum -= c;
      }
    }
    if (sum < 0) continue;
    if (sum <= ('9' - res[n - i - 1])) {
      res[n - i - 1] += sum;
      sum = 0;
    }
    if (sum == 0) break;
  }
  return res;
}
string a[1000];
int b[1000];
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> b[i];
  a[0] = "0";
  for (int i = 1; i <= n; ++i) a[i] = cons(b[i], a[i - 1]);
  for (int i = 1; i <= n; ++i) cout << a[i] << endl;
  return 0;
}
