#include <bits/stdc++.h>
using namespace std;
void solve();
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed;
  cout.precision(12);
  solve();
  return 0;
}
template <typename T>
void sc(T& x) {
  cin >> x;
}
template <typename Head, typename... Tail>
void sc(Head& head, Tail&... tail) {
  cin >> head;
  sc(tail...);
}
template <typename T>
void pr(const T& x) {
  cout << x << '\n';
}
template <typename Head, typename... Tail>
void pr(const Head& head, const Tail&... tail) {
  cout << head << ' ';
  pr(tail...);
}
template <typename... T>
void err(const T&... cod) {
  pr(cod...);
  exit(0);
}
string tz500() {
  string ans;
  for (int i = 0; i < 500; i++) ans.push_back('0');
  return ans;
}
void print_num(string s) {
  for (int i = 0; i < ((int)s.size()); i++) {
    if (s[i] != '0') {
      pr(s.substr(i));
      return;
    }
  }
}
string bld_small(int len, int d) {
  string ans;
  if (len == -1) {
    while (d > 0) {
      int pick = min(9, d);
      ans.push_back(pick + '0');
      d -= pick;
    }
  }
  for (int i = 0; i < len; i++) {
    int pick = min(9, d);
    ans.push_back(pick + '0');
    d -= pick;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
string bld(int s, string p) {
  int n = ((int)p.size());
  int cur_sum = 0;
  for (char c : p) cur_sum += (c - '0');
  for (int i = n - 1; i >= 0; i--) {
    cur_sum -= (p[i] - '0');
    for (int d = p[i] + 1; d < '9' + 1; d++) {
      int d_suf = s - cur_sum - d + '0';
      if (d_suf >= 0 && d_suf <= 9 * (n - 1 - i)) {
        string ans;
        for (int j = 0; j < i; j++) ans.push_back(p[j]);
        ans.push_back(d);
        ans += bld_small(n - 1 - i, d_suf);
        return ans;
      }
    }
  }
  assert(false);
}
void solve() {
  int n;
  sc(n);
  vector<int> a(n);
  for (int __ii = 0; __ii < n; __ii++) cin >> a[__ii];
  vector<string> ans;
  ans.push_back(tz500() + bld_small(-1, a[0]));
  for (int i = 1; i < n; i++) ans.push_back(bld(a[i], ans[i - 1]));
  for (string s : ans) print_num(s);
}
