#include <bits/stdc++.h>
using namespace std;
long long modpow(long long a, long long p, long long mod) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = (ret * a) % mod;
    a = (a * a) % mod;
    p /= 2;
  }
  return ret;
}
long long power(long long a, long long p) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = (ret * a);
    a = (a * a);
    p /= 2;
  }
  return ret;
}
string f(string s, int p) {
  int i, j, l = s.length() - 1;
  while (l >= 0) {
    for (i = s[l] - '0' + 1; i < 10; i++) {
      int sum = i;
      for (j = 0; j < l; j++) sum += (s[j] - '0');
      if (sum <= p && sum + 9 * (s.length() - 1 - l) >= p) {
        p -= sum;
        s[l] = i + '0';
        for (j = s.length() - 1; j >= l + 1; j--) {
          s[j] = (char)(min(p, 9) + '0');
          p -= min(p, 9);
        }
        return s;
      }
    }
    l--;
  }
  l = s.length() + 1;
  while (1) {
    if (l * 9 >= p) {
      string t = "";
      int sum = 0;
      for (i = 1; i < l + 1; i++)
        for (j = (i == 1 ? 1 : 0); j < 10; j++)
          if (sum + j <= p && sum + j + 9 * (l - i) >= p) {
            sum += j;
            t += (char)(j + '0');
            break;
          }
      return t;
    }
    l++;
  }
}
int a[311];
string s[311];
int main() {
  int i, j, tmp;
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  s[0] = "0";
  for (i = 0; i < n; i++) {
    s[i + 1] = f(s[i], a[i]);
    cout << s[i + 1] << endl;
  }
  return 0;
}
