#include <bits/stdc++.h>
using namespace std;
string &operator+=(string &s, int x) {
  if (x < 0) {
    s = '1' + s;
    return s;
  }
  s[x]++;
  for (int i = x; i > 0 && s[i] > '9'; i--) {
    if (s[i] == '9' + 1) {
      s[i - 1]++;
      s[i] = '0';
    }
  }
  if (s[0] == '9' + 1) {
    s.replace(0, 1, "10");
  }
  return s;
}
int count(string &s) {
  int cnt = 0, n = s.length();
  for (int i = 0; i < n; i++) {
    cnt += s[i] - '0';
  }
  return cnt;
}
int main() {
  int n;
  scanf("%d", &n);
  string prev = "0";
  int nPrev = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    for (int i = prev.length() - 1; x < nPrev && i >= 0; i--) {
      if (prev[i] > '0') {
        unsigned l = prev.length();
        prev += i - 1;
        if (prev.length() != l) {
          i++;
        }
        prev[i] = '0';
        nPrev = count(prev);
      }
    }
    int pos = prev.length() - 1;
    while (x > nPrev) {
      if (pos >= 0) {
        int t = min(x - nPrev, '9' - prev[pos]);
        prev[pos] += t;
        nPrev += t;
      } else {
        int t = min(x - nPrev, 9);
        nPrev += t;
        prev = char(t + '0') + prev;
      }
      pos--;
    }
    cout << prev << endl;
    prev += (int)(prev.length() - 1);
    nPrev = count(prev);
  }
}
