#include <bits/stdc++.h>
using namespace std;
int mat[1000][1000];
int lens[1000];
void llena(int n, int pos) {
  int len = lens[pos - 1];
  for (int i = 0; i < 400; i++) mat[pos][i] = 0;
  int tmp = n;
  n--;
  int e = 1;
  for (int i = len - 1; i >= 0; i--) {
    if (n >= mat[pos - 1][i]) {
      mat[pos][i] = mat[pos - 1][i];
      n -= mat[pos][i];
    } else {
      int p = i + 1;
      while (mat[pos][p] == 9) {
        p++;
      }
      mat[pos][p]++;
      int total = 0;
      for (int i = 0; i < p; i++) {
        total += mat[pos][i];
        mat[pos][i] = 0;
      }
      e = total;
      if (p == len) len = p + 1;
      break;
    }
  }
  e += n;
  if (e > 0) {
    int p = 0;
    while (e > 0) {
      while (mat[pos][p] < 9 && e > 0) {
        mat[pos][p]++;
        e--;
      }
      p++;
    }
    lens[pos] = max(len, p);
  } else {
    lens[pos] = len;
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int k = 0; k < n; k++) {
    int t;
    scanf("%d", &t);
    if (k == 0) {
      int pos = 0;
      while (t > 0) {
        if (t >= 9) {
          mat[0][pos] = 9;
          t -= 9;
        } else {
          mat[0][pos] = t;
          t = 0;
        }
        pos++;
      }
      lens[0] = pos;
    } else {
      llena(t, k);
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = lens[i] - 1; j >= 0; j--) {
      printf("%d", mat[i][j]);
    }
    printf("\n");
  }
  return 0;
}
