#include <bits/stdc++.h>
using namespace std;
int N;
string f(string p, int tot) {
  int i, sum = 0;
  for (i = 0; i < p.size(); i++) sum += p[i] - '0';
  bool done = 0;
  for (i = 0; i < p.size(); i++) {
    sum -= p[i] - '0';
    if (p[i] == '9' || (sum + p[i] - '0') >= tot || sum + 9 + 9 * i < tot)
      continue;
    p[i]++;
    tot -= sum + p[i] - '0';
    for (int j = 0; j < i; j++) {
      if (tot >= 9)
        p[j] = '9';
      else
        p[j] = tot + '0';
      tot -= p[j] - '0';
    }
    if (tot) p[i] += tot;
    done = 1;
    break;
  }
  if (done)
    return p;
  else
    return f(p + '0', tot);
}
int main() {
  cin >> N;
  string t("0");
  for (int i = 0, b; i < N; i++) {
    cin >> b;
    t = f(t, b);
    for (int j = t.size() - 1; j >= 0; j--) cout << t[j];
    cout << endl;
  }
  return 0;
}
