#include <bits/stdc++.h>
using namespace std;
int a[3333][3333], b[3333];
int t[3333];
int n;
void opp(int pos) {
  int i, j, sum = 0;
  ;
  for (i = 0; i < 500; i++) t[i] = a[pos - 1][i];
  t[0]++;
  i = 0;
  while (t[i] > 9) t[i] = 0, t[i + 1]++, i++;
  for (j = 0; j <= 500; j++) sum += t[j];
  if (sum < b[pos]) {
    b[pos] -= sum;
    i = 0;
    while (b[pos] > 0) {
      int x = b[pos];
      if (x + t[i] > 9)
        b[pos] -= (9 - t[i]), t[i] = 9;
      else
        b[pos] = 0, t[i] += x;
      i++;
    }
  } else {
    j = 1;
    while (sum != b[pos]) {
      t[j]++;
      i = j;
      while (t[i] > 9) t[i] = 0, t[i + 1]++, i++;
      for (i = 0; i < j; i++) t[i] = 0;
      sum = 0;
      for (i = 0; i <= 500; i++) sum += t[i];
      int temp = b[pos] - sum;
      int k = 0;
      while (temp > 0) {
        if (temp + t[k] > 9)
          temp -= (9 - t[k]), t[k] = 9;
        else {
          t[k] += temp;
          temp = 0;
        }
        k++;
      }
      sum = 0;
      for (i = 0; i <= 500; i++) sum += t[i];
      j++;
    }
  }
  for (i = 0; i < 500; i++) a[pos][i] = t[i];
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &b[i]);
    opp(i);
  }
  for (int i = 1; i <= n; i++) {
    int j = 500;
    while (a[i][j] == 0) j--;
    while (j >= 0) printf("%d", a[i][j]), j--;
    printf("\n");
  }
  return 0;
}
