#include <bits/stdc++.h>
unsigned long long mpow(unsigned long long a, unsigned long long n,
                        unsigned long long mod) {
  unsigned long long ret = 1;
  unsigned long long b = a;
  while (n) {
    if (n & 1) ret = (ret * b) % mod;
    b = (b * b) % mod;
    n >>= 1;
  }
  return (unsigned long long)ret;
}
using namespace std;
char s[501], temp[501];
int len = 0;
void print() {
  for (int i = len; i >= 0; i--) putchar(s[i]);
  puts(" ");
}
bool chk(int sum, int idx) {
  for (int i = len; i >= idx; i--) sum -= (temp[i] - '0');
  if (sum < 0) return 0;
  for (int i = 0; i < idx; i++) {
    temp[i] = '0' + min(sum, 9);
    sum -= min(sum, 9);
  }
  return !sum;
}
void go(int sum) {
  if (9 * (len + 1) < sum) {
    len = 0;
    while (sum > 9) {
      sum -= 9;
      s[len++] = '9';
    }
    s[len] = sum + '0';
    print();
    return;
  }
  strcpy(temp, s);
  for (int i = 0; i <= len; i++)
    for (char c = s[i] + 1; c <= '9'; c++) {
      temp[i] = c;
      if (chk(sum, i)) {
        memcpy(s, temp, len + 1);
        print();
        return;
      }
    }
  len++;
  memset(s, '0', len);
  s[len] = '1';
  int now = 0;
  sum--;
  while (sum > 0) {
    s[now] += min(sum, 9);
    sum -= min(sum, 9);
    now++;
  }
  print();
}
int main() {
  int n;
  int a[301];
  scanf("%d", &n);
  ;
  int i, j;
  for (j = 0; j < n; j++) scanf("%d", &a[j]);
  ;
  int sum = a[0];
  while (sum > 9) {
    sum -= 9;
    s[len++] = '9';
  }
  s[len] = sum + '0';
  print();
  for (i = 1; i < n; i++) go(a[i]);
  return 0;
}
