#include <bits/stdc++.h>
using namespace std;
long n, s[1 << 10];
vector<long> v[1 << 10];
long spre, slim, found;
long trem, tail;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> s[i];
    for (int j = 0; j < 666; j++) v[i].push_back(0);
  }
  for (int j = 0; j < 666; j++) v[0].push_back(0);
  for (int i = 1; i <= n; i++) {
    v[i] = v[i - 1];
    spre = s[i - 1];
    slim = 0;
    found = 0;
    for (int j = 665; j >= 0; --j) {
      if (found) break;
      spre -= v[i][j];
      for (int q = v[i][j] + 1; q <= 9 && found == 0; q++) {
        trem = spre + q;
        tail = s[i] - trem;
        if (tail >= 0 && tail <= slim) {
          v[i][j] = q;
          for (int t = 665; t > j; t--) {
            if (tail > 9) {
              v[i][t] = 9;
              tail -= 9;
            } else {
              v[i][t] = tail;
              tail = 0;
            }
          }
          found = 1;
          v[i][j] = q;
        }
      }
      slim += 9;
    }
  }
  for (int i = 1; i <= n; i++) {
    reverse(v[i].begin(), v[i].end());
    while (v[i].size() > 1 && v[i].back() == 0) v[i].pop_back();
    reverse(v[i].begin(), v[i].end());
    for (int j = 0; j < v[i].size(); j++) {
      cout << v[i][j];
    }
    cout << endl;
  }
  cin.get();
  cin.get();
  return 0;
}
