#include <bits/stdc++.h>
using namespace std;
int numCount;
vector<int> digitSum;
vector<vector<int>> nums;
void printDigits(vector<int> &digits);
void minReverseWithSum(int digSum, vector<int> &digits);
void minReverseWithSum(int digSum, int minDigCount, vector<int> &digits);
int getFromTail(vector<int> &digits, int headIndex, int toGet, bool check);
int raiseTo(vector<int> &toRaise, const vector<int> &par);
bool next(vector<int> &digits, int firstParredDiscrepancy);
void pushRight(vector<int> &digits, int headIndex);
int main() {
  cin >> numCount;
  digitSum = vector<int>(numCount);
  for (int i = 0; i < numCount; i++) cin >> digitSum[i];
  nums = vector<vector<int>>(numCount);
  for (int i = 0; i < numCount; i++) nums[i].reserve(300);
  minReverseWithSum(digitSum[0], nums[0]);
  reverse(nums[0].begin(), nums[0].end());
  for (int i = 1; i < numCount; i++) {
    minReverseWithSum(digitSum[i], nums[i - 1].size(), nums[i]);
    reverse(nums[i].begin(), nums[i].end());
    if (nums[i].size() > nums[i - 1].size()) continue;
    int fixResult = raiseTo(nums[i], nums[i - 1]);
    if (fixResult < 0)
      continue;
    else if (fixResult == 0 || !next(nums[i], fixResult)) {
      nums[i].clear();
      minReverseWithSum(digitSum[i], nums[i - 1].size() + 1, nums[i]);
      reverse(nums[i].begin(), nums[i].end());
    }
  }
  for (int i = 0; i < numCount; i++) {
    for (int digit : nums[i]) cout << digit;
    cout << "\n";
  }
  return 0;
}
void printDigits(vector<int> &digits) {
  for (int digit : digits) cerr << digit;
  cerr << "\n";
}
void minReverseWithSum(int digSum, vector<int> &digits) {
  digits.clear();
  for (int remaining = digSum; remaining > 0;) {
    int toAdd = min(9, remaining);
    remaining -= toAdd;
    digits.push_back(toAdd);
  }
}
void minReverseWithSum(int digSum, int minDigCount, vector<int> &digits) {
  minReverseWithSum(digSum, digits);
  if (digits.size() < minDigCount) {
    digits[digits.size() - 1]--;
    while (digits.size() < minDigCount - 1) digits.push_back(0);
    digits.push_back(1);
  }
}
int getFromTail(vector<int> &digits, int headIndex, int toGet, bool check) {
  int got = 0;
  for (int i = headIndex + 1; i < digits.size(); i++) {
    int getFromThis = min(min(toGet - got, digits[i]), 9);
    if (!check) digits[i] -= getFromThis;
    got += getFromThis;
    if (got == toGet) return got;
  }
  return got;
}
int raiseTo(vector<int> &toRaise, const vector<int> &par) {
  if (toRaise.size() > par.size() || toRaise.size() < par.size())
    while (true)
      ;
  int i;
  for (i = 0; i < par.size(); i++) {
    if (toRaise[i] > par[i]) return -1;
    if (toRaise[i] == par[i]) continue;
    int tailGet = getFromTail(toRaise, i, par[i] - toRaise[i], true);
    if (tailGet < par[i] - toRaise[i]) return i;
    toRaise[i] += getFromTail(toRaise, i, par[i] - toRaise[i], false);
  }
  return i;
}
bool next(vector<int> &digits, int firstParredDiscrepancy) {
  bool canGetFromTail =
      getFromTail(digits, firstParredDiscrepancy - 1, 1, true) > 0;
  for (int i = firstParredDiscrepancy - 1; i >= 0; i--) {
    if (canGetFromTail && digits[i] != 9) {
      getFromTail(digits, i, 1, false);
      digits[i]++;
      pushRight(digits, i);
      return true;
    }
    canGetFromTail |= digits[i] > 0;
  }
  return false;
}
void pushRight(vector<int> &digits, int headIndex) {
  int pushStart = headIndex + 1, getIndex = digits.size() - 1;
  while (pushStart < getIndex) {
    int canGet = 9 - digits[getIndex];
    if (digits[pushStart] > canGet) {
      digits[pushStart] -= canGet;
      digits[getIndex] += canGet;
      getIndex--;
    } else if (digits[pushStart] < canGet) {
      digits[getIndex] += digits[pushStart];
      digits[pushStart] = 0;
      pushStart++;
    } else {
      digits[pushStart] = 0;
      digits[getIndex] = 9;
      pushStart++;
      getIndex--;
    }
  }
}
