#include <bits/stdc++.h>
using namespace std;
char s[1000010];
long long a[320];
long long len = 0;
void print() {
  for (long long i = len; i >= 0; i--) cout << s[i];
  cout << "\n";
}
void add(long long diff) {
  if (diff <= 0) {
    long long i;
    for (i = 0;; i++)
      if (i != 0 && diff > 0 && s[i] != '9') {
        s[i]++;
        diff--;
        len = max(len, i);
        break;
      } else {
        diff += s[i] - '0';
        s[i] = '0';
      }
  }
  long long i = 0;
  while (diff > 0) {
    char prev = s[i];
    s[i] = min(9LL, diff + s[i] - '0') + '0';
    len = max(len, i);
    diff -= s[i] - prev;
    i++;
  }
}
int main() {
  cin.sync_with_stdio(0);
  long long n;
  cin >> n;
  for (long long i = 0; i <= 1000000; i++) s[i] = '0';
  a[0] = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    add(a[i] - a[i - 1]);
    print();
  }
  return 0;
}
