#include <bits/stdc++.h>
using namespace std;
int num[310][1000], len[310];
int main() {
  int n, last = 0;
  scanf("%d", &n);
  len[0] = 1;
  for (int b, i = 1; i <= n; i++, last = b) {
    scanf("%d", &b);
    if (b > last) {
      int now = 1, tmp = b - last;
      while (tmp) {
        int t = min(tmp, 9 - num[i - 1][now]);
        num[i][now] = num[i - 1][now] + t;
        tmp -= t;
        now++;
      }
      for (int j = now; j <= len[i - 1]; j++) num[i][j] = num[i - 1][j];
      len[i] = max(now - 1, len[i - 1]);
    } else {
      int now = 1, tmp = b - last - 1, sum = 1;
      while (tmp < 0 || num[i - 1][now] == 9) {
        tmp += num[i - 1][now];
        now++;
      }
      num[i][now] = num[i - 1][now] + 1;
      for (int j = now + 1; j <= len[i - 1]; j++) num[i][j] = num[i - 1][j];
      for (int j = 1; tmp > 0; j++) {
        num[i][j] = min(tmp, 9);
        tmp -= num[i][j];
      }
      len[i] = max(now, len[i - 1]);
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = len[i]; j > 0; j--) printf("%d", num[i][j]);
    printf("\n");
  }
  return 0;
}
