#include <bits/stdc++.h>
using namespace std;
string fn(int len, int sod) {
  string ret = "";
  while (len--) {
    if (sod >= 9) {
      ret = "9" + ret;
      sod -= 9;
    } else {
      ret = char('0' + sod) + ret;
      sod = 0;
    }
  }
  return ret;
}
string gen(int n, int sod) {
  for (int i = 1; i < 10 && i <= sod; i++) {
    if (sod - i <= (n - 1) * 9) return char(i + '0') + fn(n - 1, sod - i);
  }
}
string get_min(string ss, int sod) {
  int len = ss.length();
  for (int i = len - 1; i >= 0; i--) {
    int sod_ss = 0;
    string ret = "";
    for (int j = 0; j < i; j++) {
      ret += ss[j];
      sod_ss += (ss[j] - '0');
    }
    for (int j = ss[i] - '0' + 1; j < 10; j++) {
      if ((9 * (len - i - 1)) >= sod - sod_ss - j && sod >= sod_ss + j) {
        ret += char(j + '0');
        ret += fn(len - i - 1, sod - sod_ss - j);
        return ret;
      }
    }
  }
  while (len++) {
    if (len * 9 >= sod) return gen(len, sod);
  }
}
int main() {
  int n;
  cin >> n;
  string previous = "0";
  for (int i = 0; i < n; i++) {
    int sum_of_digits = 0;
    cin >> sum_of_digits;
    string previous1 = get_min(previous, sum_of_digits);
    cout << previous1 << endl;
    previous = previous1;
  }
  return 0;
}
