#include <bits/stdc++.h>
using namespace std;
int n, a[505], s[505], t[505], len;
void calc(int x, int l) {
  memset(s, 0, sizeof(s));
  len = 0;
  x--;
  s[l] = 1;
  while (x >= 9 && len < l) s[++len] = 9, x -= 9;
  if (x) s[++len] += x;
  len = l;
}
void print() {
  for (int i = len; i > 0; i--) printf("%d", s[i]);
  puts("");
}
bool check(int x) {
  t[len + 1] = 0;
  for (int i = len; i > 0; i--) t[i] = t[i + 1] + s[i];
  for (int i = 1; i <= len; i++) {
    if (t[i] + 1 > x || s[i] == 9) continue;
    s[i]++;
    while (x > 9 * (i - 1) + t[i + 1] + s[i] && s[i] < 9) s[i]++;
    if (x > 9 * (i - 1) + t[i + 1] + s[i]) continue;
    x = x - (t[i + 1] + s[i]);
    int now = 1;
    while (now < i && x >= 9) s[now++] = 9, x -= 9;
    if (now != i) s[now++] = x;
    for (int j = now; j < i; j++) s[j] = 0;
    return true;
  }
  return false;
}
signed main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  calc(a[1], a[1] / 9 + (a[1] % 9 != 0));
  print();
  for (int i = 2; i <= n; i++) {
    if (a[i] > 9 * len) calc(a[i], a[i] / 9 + (a[i] % 9 != 0));
    if (!check(a[i])) calc(a[i], max(a[i] / 9 + (a[i] % 9 != 0), len + 1));
    print();
  }
  return 0;
}
