#include <bits/stdc++.h>
using namespace std;
int n, b[3005], a[3005], len;
void get(int now) {
  for (int i = 1; now; i++) {
    while (a[i] < 9 && now) {
      a[i]++;
      now--;
    }
    if (!now && i > len) len = i;
  }
}
void print() {
  for (int i = len; i >= 1; i--) printf("%d", a[i]);
  printf("\n");
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  get(b[1]);
  print();
  for (int i = 2; i <= n; i++) {
    int dealt = b[i] - b[i - 1];
    if (dealt > 0) {
      get(dealt);
      print();
    } else {
      int k = 1;
      while (1) {
        if (k > len) len = k;
        if (dealt > 0 && a[k] < 9) {
          ++a[k];
          get(dealt - 1);
          print();
          break;
        }
        dealt += a[k];
        a[k] = 0;
        k++;
      }
    }
  }
  return 0;
}
