#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1e3 + 4;
const int Maxq = 305;
const int INF = 0x3f3f3f3f;
int b[Maxn], ans[Maxn], tot = 0;
int jin(int &x) {
  int pos = 0;
  while (ans[pos] == 9 || x <= 0) {
    x += ans[pos];
    ans[pos++] = 0;
  }
  ans[pos]++;
  x--;
  tot = max(tot, pos + 1);
  return x;
}
void solve(int x) {
  if (x <= 0) jin(x);
  int pos = 0;
  while (x > 0) {
    if (9 - ans[pos] <= x) {
      x -= 9 - ans[pos];
      ans[pos] = 9;
    } else {
      ans[pos] += x;
      x = 0;
    }
    pos++;
  }
  tot = max(tot, pos);
  for (int i = tot - 1; i >= 0; --i) printf("%d", ans[i]);
  puts("");
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= n; i++) solve(b[i] - b[i - 1]);
  return 0;
}
