#include <bits/stdc++.h>
using namespace std;
void debug() {
  fflush(stdin);
  printf("Press any key to continue");
  getc(stdin);
  fflush(stdin);
}
int n;
int b[305];
vector<int> s;
void in() {
  int i = 0;
  while (s[i] == 0) i++;
  while (i < s.size()) printf("%d", s[i++]);
  printf("\n");
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (int i = 0; i < 351; i++) s.push_back(0);
  for (int i = 1; i <= n; i++) {
    int sum = b[i - 1];
    bool flag = false;
    for (int j = 350; j >= 0; j--) {
      sum -= s[j];
      for (int k = s[j] + 1; k <= 9; k++) {
        int tmp = sum + k;
        if (b[i] >= tmp && b[i] <= tmp + 9 * (350 - j)) {
          s[j] = k;
          sum += k;
          for (int r = 350; r > j; r--) {
            if (sum + 9 <= b[i]) {
              s[r] = 9;
              sum += s[r];
            } else {
              s[r] = b[i] - sum;
              sum += s[r];
            }
          }
          flag = true;
          break;
        }
      }
      if (flag) break;
    }
    in();
  }
  return 0;
}
