#include <bits/stdc++.h>
using namespace std;
int digit[1000];
int bs[304];
int curdigits[1000];
void findDigit(int id, int sum) {
  if (id < 0) return;
  if (sum == 0) return;
  for (int k = 9; k >= 0; k--) {
    if (sum - k >= 0) {
      digit[id] = k;
      findDigit(id - 1, sum - k);
      return;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> bs[i];
  }
  for (int i = 0; i < 1000; i++) curdigits[i] = 0;
  int previousDigitSum = 0;
  for (int i = 0; i < n; i++) {
    int j = 0;
    bool isdone = false;
    while (1) {
      previousDigitSum -= curdigits[j];
      int maxright = 0;
      if (j > 0) {
        maxright = 9 * j;
      }
      while (++curdigits[j] < 10) {
        int temp = bs[i] - curdigits[j] - previousDigitSum;
        if (temp >= 0 && temp <= maxright) {
          for (int k = 0; k < j; k++) {
            digit[k] = 0;
          }
          findDigit(j - 1, temp);
          for (int k = 0; k < j; k++) {
            curdigits[k] = digit[j - k - 1];
          }
          isdone = true;
          break;
        }
      }
      if (isdone) break;
      j++;
    }
    bool print = false;
    for (int k = 500; k >= 0; k--) {
      if (curdigits[k] > 0) {
        print = true;
      }
      if (print) {
        cout << curdigits[k];
      }
    }
    cout << endl;
    previousDigitSum = bs[i];
  }
}
