#include <bits/stdc++.h>
using namespace std;
const int LARGE = 1000;
void Convertir(char A[], int b) {
  int sum = 0;
  for (int i = 0; i < LARGE; i++) {
    sum += (A[i] - '0');
  }
  int j = 0;
  while (sum > b) {
    sum -= A[j] - '0';
    A[j] = '0';
    int k = j + 1;
    while (A[k] == '9') A[k] = '0', sum -= 9, k++;
    A[k]++, sum++;
    j++;
  }
  int i = 0;
  while (sum < b) {
    if (b - sum > '9' - A[i])
      sum += '9' - A[i], A[i] = '9';
    else
      A[i] += b - sum, sum = b;
    i++;
  }
}
void Next(char A[]) {
  int i = 0;
  while (A[i] == '9') A[i] = '0', i++;
  A[i]++;
}
int main() {
  char Nums[LARGE];
  for (int i = 0; i < LARGE; i++) Nums[i] = '0';
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int b;
    cin >> b;
    Convertir(Nums, b);
    int k = LARGE - 1;
    while (Nums[k] == '0') k--;
    while (k >= 0) {
      cout << Nums[k];
      k--;
    }
    cout << endl;
    Next(Nums);
  }
}
