#include <bits/stdc++.h>
using namespace std;
int len;
char num[500];
bool compute(int x, int sum, bool run) {
  if (len == x) {
    if (sum) return 0;
    printf("%s\n", num);
    return 1;
  }
  if (9 * (len - x) < sum) return 0;
  if (run && len == strlen(num)) {
    if (sum - (num[x] - '0') <= 0) return 0;
    if (compute(x + 1, sum - (num[x] - '0'), 1)) return 1;
    if (num[x] == '9') return 0;
    num[x]++;
    if (compute(x + 1, sum - (num[x] - '0'), 0)) return 1;
  }
  int angka = sum - 9 * (len - x - 1);
  if (angka < 0) angka = 0;
  if (!angka && !x) angka = 1;
  num[x] = angka + '0';
  if (compute(x + 1, sum - angka, 0)) return 1;
  return 0;
}
int main() {
  int n, b;
  scanf("%d", &n);
  strcpy(num, "0");
  len = 1;
  while (n--) {
    scanf("%d", &b);
    while (!compute(0, b, 1)) num[len++] = '\0';
  }
  return 0;
}
