#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
int n, b[300];
string a[300];
bool isSmall(int idx) {
  if (a[idx].length() < a[idx - 1].length())
    return false;
  else if (a[idx].length() > a[idx - 1].length())
    return true;
  for (int i = a[idx].length() - 1; i >= 0; i--) {
    if (a[idx][i] > a[idx - 1][i])
      return true;
    else if (a[idx][i] < a[idx - 1][i])
      return false;
  }
  return false;
}
void refine(int idx) {
  a[idx] = "";
  for (int i = 0; i < (int)a[idx - 1].length(); i++) {
    a[idx] += "0";
  }
  int diff = b[idx] - b[idx - 1];
  int left = b[idx];
  int failedIdx = -1;
  for (int i = a[idx - 1].length() - 1; i >= 0; i--) {
    if (left > (a[idx - 1][i] - '0')) {
      left -= (a[idx - 1][i] - '0');
      a[idx][i] = a[idx - 1][i];
    } else {
      failedIdx = i;
      break;
      ;
    }
  }
  bool added = false;
  for (int i = failedIdx + 1; i < (int)a[idx - 1].length(); i++) {
    if ((a[idx][i] - '0') < 9) {
      a[idx][i]++;
      left--;
      added = true;
      break;
    } else {
      a[idx][i] = '0';
      left += 9;
    }
  }
  if (!added) {
    a[idx] += "1";
    left--;
  }
  for (int i = 0; i < (int)a[idx].length(); i++) {
    int diff = 9 - (a[idx][i] - '0');
    if (diff) {
      if (left >= diff) {
        a[idx][i] += diff;
        left -= diff;
      } else {
        a[idx][i] += left;
        left = 0;
      }
    }
    if (!left) break;
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < (int)n; i++) cin >> b[i];
  for (int i = 0; i < (int)n; i++) {
    a[i] = "";
    int next = 0;
    int tmp = b[i];
    int idx = 0;
    while (tmp) {
      if (tmp > 9) {
        a[i] += "9";
        tmp -= 9;
      } else {
        a[i] += "0";
        a[i][a[i].length() - 1] = (char)(tmp + 48);
        tmp = 0;
      }
      idx++;
    }
    idx--;
    if (i == 0) continue;
    if (!isSmall(i)) {
      refine(i);
    }
  }
  for (int i = 0; i < (int)n; i++) {
    for (int j = a[i].length() - 1; j >= 0; j--) {
      cout << a[i][j];
    }
    cout << endl;
  }
  return 0;
}
