#include <bits/stdc++.h>
using namespace std;
int main(int argc, char **argv) {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> b(n);
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  vector<string> a(n);
  int sum = b[0];
  while (sum > 0) {
    if (sum > 9) {
      a[0].insert(0, 1, '9');
      sum -= 9;
    } else {
      a[0].insert(0, 1, sum + '0');
      break;
    }
  }
  for (int i = 1; i < n; i++) {
    int diff = b[i] - b[i - 1];
    if (diff > 0) {
      for (int j = a[i - 1].size() - 1; j >= 0; j--) {
        int maxD = '9' - a[i - 1][j];
        if (maxD < diff) {
          a[i].insert(0, 1, '9');
          diff -= maxD;
        } else {
          a[i].insert(0, 1, a[i - 1][j] + diff);
          diff = 0;
        }
      }
      while (diff > 0) {
        if (diff > 9) {
          a[i].insert(0, 1, '9');
          diff -= 9;
        } else {
          a[i].insert(0, 1, '0' + diff);
          break;
        }
      }
    } else {
      int highSum = b[i - 1];
      int pos = -1;
      for (int j = a[i - 1].size() - 1; j > 0; j--) {
        highSum -= a[i - 1][j] - '0';
        if (a[i - 1][j - 1] == '9') {
          continue;
        }
        if (highSum + 1 <= b[i]) {
          pos = j;
          break;
        }
      }
      if (pos != -1) {
        for (int j = 0; j < pos; j++) {
          a[i].push_back(a[i - 1][j]);
        }
        a[i][pos - 1]++;
        int r = b[i] - (highSum + 1);
        for (int j = pos; j < a[i - 1].size(); j++) {
          if (r > 9) {
            a[i].insert(pos, 1, '9');
            r -= 9;
          } else {
            a[i].insert(pos, 1, '0' + r);
            r = 0;
          }
        }
      } else {
        a[i].push_back('1');
        int r = b[i] - 1;
        for (int j = 0; j < a[i - 1].size(); j++) {
          if (r > 9) {
            a[i].insert(1, 1, '9');
            r -= 9;
          } else {
            a[i].insert(1, 1, '0' + r);
            r = 0;
          }
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << a[i] << endl;
  }
  return 0;
}
