#include <bits/stdc++.h>
using namespace std;
const int MAXN = 301000;
int cnt = 0;
int dig[MAXN];
int sum[MAXN];
void output() {
  for (int i = cnt - 1; i >= 0; --i) printf("%d", dig[i]);
  printf("\n");
}
void add(int x) {
  for (int i = 0; x > 0; ++i) {
    if (dig[i] + x > 9) {
      x -= 9 - dig[i];
      dig[i] = 9;
    } else {
      dig[i] += x;
      x = 0;
    }
    cnt = max(cnt, i + 1);
  }
}
void remove(int x) {
  ++x;
  int sum = 0;
  for (int i = 0; i < cnt; ++i) {
    sum += dig[i];
    if (sum >= x && dig[i + 1] != 9) {
      ++dig[i + 1];
      cnt = max(cnt, i + 2);
      x = sum - x;
      for (int j = 0; j <= i; ++j) {
        if (x > 9) {
          dig[j] = 9;
          x -= 9;
        } else {
          dig[j] = x;
          x = 0;
        }
      }
      return;
    }
  }
}
void zero() {
  remove(0);
  return;
  int pos = -1;
  for (int i = 0; i < cnt; ++i) {
    if (pos == -1 && dig[i] > 0) pos = i;
    if (dig[i] > 0 & dig[i + 1] != 9) {
      --dig[i];
      ++dig[i + 1];
      cnt = max(cnt, i + 2);
      return;
    }
  }
}
void update_sum() {
  sum[0] = dig[0];
  for (int i = 1; i < cnt; ++i) sum[i] = sum[i - 1] + dig[i];
}
int main(void) {
  int N;
  scanf("%d", &N);
  int curr = 0;
  for (int i = 0; i < N; ++i) {
    int x;
    scanf("%d", &x);
    if (x > curr) {
      add(x - curr);
    } else if (x < curr) {
      remove(curr - x);
    } else {
      zero();
    }
    curr = x;
    update_sum();
    output();
  }
  return 0;
}
