#include <bits/stdc++.h>
int main() {
  int n, a[400] = {0}, len = 0, sum = 0;
  for (scanf("%d", &n); n > 0; n--) {
    int b;
    scanf("%d", &b);
    if (len * 9 < b) {
      sum = b;
      for (len = 0; b >= 9; b -= 9) a[len++] = 9;
      if (b > 0) a[len++] = b;
    } else {
      for (int i = 0;; i++) {
        if (i >= len) len = i + 1;
        if (sum < b && a[i] < 9 && 9 - a[i] + 9 * i >= b - sum) {
          for (a[i]++; a[i] <= 9; a[i]++) {
            sum++;
            if (9 * i >= b - sum) {
              for (int left = b - sum, j = 0; j < i; j++) {
                a[j] = left >= 9 ? 9 : left;
                left = left >= 9 ? left - 9 : 0;
              }
              break;
            }
          }
          break;
        }
        sum -= a[i];
      }
      sum = b;
    }
    for (int i = len - 1; i >= 0; i--) printf("%d", a[i]);
    printf("\n");
  }
}
