#include <bits/stdc++.h>
using namespace std;
int n, pre, x, a[400], len;
void go1(int p) {
  int i = 1;
  len = max(len, i);
  while (p) {
    if (a[i] == 9) {
      i++;
      len = max(len, i);
    } else {
      a[i]++;
      p--;
    }
  }
}
void go2(int p) {
  int i = 1;
  while (p <= 0) {
    p += a[i];
    a[i++] = 0;
    len = max(len, i);
  }
  while (a[i] == 9) {
    p += a[i];
    a[i++] = 0;
    len = max(len, i);
  }
  a[i]++;
  p--;
  go1(p);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    int dif = x - pre;
    pre = x;
    if (dif > 0) {
      go1(dif);
    } else {
      go2(dif);
    }
    for (int j = len; j >= 1; j--) {
      printf("%d", a[j]);
    }
    puts("");
  }
  return 0;
}
