#include <bits/stdc++.h>
using namespace std;
int b[305];
vector<int> g[305];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", b + i);
  b[0] = 0;
  g[0].push_back(0);
  for (int i = 1; i <= n; i++) {
    if (b[i] > b[i - 1]) {
      int temp = b[i] - b[i - 1];
      for (int j = g[i - 1].size() - 1; j >= 0; j--) {
        int now = g[i - 1][j];
        if (temp == 0) break;
        if (temp > 9 - now) {
          g[i].push_back(9);
          temp -= (9 - now);
        } else {
          g[i].push_back(now + temp);
          temp = 0;
          for (int k = j - 1; k >= 0; k--) g[i].push_back(g[i - 1][k]);
        }
      }
      while (temp) {
        if (temp >= 9) {
          g[i].push_back(9);
          temp -= 9;
        } else {
          g[i].push_back(temp);
          temp = 0;
        }
      }
    } else {
      int temp = b[i - 1] - b[i] + 1;
      int flag = g[i - 1].size() - 1;
      int sum = 0;
      for (int j = g[i - 1].size() - 1; j >= 0; j--) {
        sum += g[i - 1][j];
        if (sum >= temp) {
          flag = j - 1;
          break;
        }
      }
      while (flag >= 0 && g[i - 1][flag] == 9) {
        flag--;
      }
      int p = flag;
      for (int j = g[i - 1].size() - 1; j >= flag + 1; j--)
        g[i].push_back(g[i - 1][j]);
      sort(g[i].begin(), g[i].end());
      for (int j = 0; j < g[i].size(); j++) {
        if (temp > g[i][j]) {
          temp -= g[i][j];
          g[i][j] = 0;
        } else {
          g[i][j] -= temp;
          temp = 0;
          break;
        }
      }
      reverse(g[i].begin(), g[i].end());
      int ad = 1;
      for (int j = p; j >= 0; j--) {
        int now = g[i - 1][j];
        if (now + ad == 10) {
          g[i].push_back(9);
          ad = 1;
        } else {
          g[i].push_back(now + ad);
          ad = 0;
        }
      }
      if (ad == 1) g[i].push_back(1);
    }
    reverse(g[i].begin(), g[i].end());
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < g[i].size(); j++) printf("%d", g[i][j]);
    printf("\n");
  }
}
