#include <bits/stdc++.h>
using namespace std;
const int MAXN = 500 + 4;
int n, a[MAXN];
struct Ntp {
  int dig, d[MAXN];
  Ntp() {
    dig = 1;
    memset(d, 0, sizeof d);
  }
};
Ntp cur;
void work(Ntp &cur, int sum) {
  if (9 * cur.dig < sum) {
    cur.dig = 0;
    int t = sum;
    while (t > 9) {
      t -= 9;
      cur.d[++cur.dig] = 9;
    }
    cur.d[++cur.dig] = t;
    return;
  }
  if (cur.d[cur.dig] >= sum) {
    ++cur.dig;
    cur.d[cur.dig] = 1;
    cur.d[1] = sum - 1;
    for (int i = 2; i < cur.dig; ++i) cur.d[i] = 0;
    return;
  }
  int pre = 0;
  for (int i = cur.dig; i >= 1; --i) {
    if (pre + cur.d[i] + 9 * (i - 1) < sum) {
      for (int j = 1; j < i; ++j) {
        cur.d[j] = 9;
      }
      cur.d[i] = sum - pre - 9 * (i - 1);
      return;
    } else if (pre + cur.d[i] >= sum) {
      ++cur.d[i + 1];
      ++pre;
      int t = i + 1;
      while (cur.d[t] == 10) {
        cur.d[t] = 0;
        ++cur.d[t + 1];
        pre -= 9;
        ++t;
      }
      if (t > cur.dig) cur.dig = t;
      int j;
      for (j = 1; sum - pre > 9; ++j) {
        pre += 9;
        cur.d[j] = 9;
      }
      cur.d[j++] = sum - pre;
      for (; j < t; ++j) cur.d[j] = 0;
      return;
    } else
      pre += cur.d[i];
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    work(cur, x);
    for (int j = cur.dig; j >= 1; --j) {
      putchar(cur.d[j] + 48);
    }
    puts("");
  }
  return 0;
}
