#include <bits/stdc++.h>
using namespace std;
char tochar(int y);
string tonum(int y);
string rep(char y, int cant);
bool mayorQue(string a, string b);
string modificar(string ant, string act, int vant, int vact);
string sumar(string a, int cant);
string igualar(string a, int sum);
string distribuir(string a, int vact);
int main() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int y;
    cin >> y;
    v.push_back(y);
  }
  string ant = tonum(v[0]);
  int vant = v[0];
  cout << ant << endl;
  for (int i = 1; i < n; i++) {
    int vact = v[i];
    string act = tonum(vact);
    if (!mayorQue(act, ant)) act = modificar(ant, act, vant, vact);
    ant = act;
    vant = vact;
    cout << ant << endl;
  }
  return 0;
}
string modificar(string ant, string act, int vant, int vact) {
  string res = "";
  act = igualar(ant, vact);
  if (vact > vant) {
    res = sumar(ant, vact - vant);
  } else {
    res = distribuir(act, vact);
  }
  return res;
}
string sumar(string a, int cant) {
  string res = "";
  for (int i = a.size() - 1; i >= 0; i--) {
    char x = a[i];
    int aux = (x - '0');
    if ((9 - aux) <= cant)
      res = '9' + res, cant -= (9 - aux);
    else {
      if (cant)
        res = tochar(cant + aux) + res;
      else
        res = x + res;
      cant = 0;
    }
  }
  return res;
}
string igualar(string a, int sum) {
  string res = "";
  for (int i = 0; i < a.size(); i++) {
    char x = a[i];
    int aux = (x - '0');
    if (aux <= sum)
      res = res + x, sum -= aux;
    else {
      if (sum)
        res = res + tochar(sum);
      else
        res = res + '0';
      sum = 0;
    }
  }
  return res;
}
string distribuir(string a, int vact) {
  string res = "";
  bool val0 = true, val9 = true;
  int pos0 = a.size() - 1, pos9;
  while (val0 && pos0 >= 0) {
    if (a[pos0] != '0') val0 = false;
    pos0--;
  }
  pos9 = pos0;
  pos0++;
  while (val9 && pos9 >= 0) {
    if (a[pos9] != '9') val9 = false;
    pos9--;
  }
  pos9++;
  if (!val0 && !val9 && pos0 > 0) {
    a[pos9]++;
    int sum = 0;
    for (int i = 0; i <= pos9; i++) {
      char x = a[i];
      int aux = (x - '0');
      sum += aux;
      res += x;
    }
    string fi = tonum(vact - sum);
    string me = rep('0', a.size() - res.size() - fi.size());
    res = res + me + fi;
  } else {
    res = "1";
    string fi = "";
    if (vact - 1 > 0) fi = fi + tonum(vact - 1);
    string me = rep('0', a.size() - fi.size());
    res = res + me + fi;
  }
  return res;
}
string tonum(int y) {
  string res = "";
  if (y % 9) res += tochar(y % 9);
  res += rep('9', y / 9);
  return res;
}
char tochar(int y) {
  if (y == 0) return '0';
  if (y == 1) return '1';
  if (y == 2) return '2';
  if (y == 3) return '3';
  if (y == 4) return '4';
  if (y == 5) return '5';
  if (y == 6) return '6';
  if (y == 7) return '7';
  if (y == 8) return '8';
  if (y == 9) return '9';
  return '0';
}
string rep(char y, int cant) {
  string res = "";
  for (int i = 0; i < cant; i++) res = res + y;
  return res;
}
bool mayorQue(string a, string b) {
  bool res = false;
  if (a.size() > b.size()) return true;
  if (a.size() < b.size()) return false;
  int pos = 0;
  while (pos < a.size()) {
    if (a[pos] - b[pos] > 0) return true;
    if (a[pos] - b[pos] < 0) return false;
    pos++;
  }
  return res;
}
