#include <bits/stdc++.h>
using namespace std;
int b[305];
vector<int> ans[305];
void cnt(int pos, int tot) {
  if (b[pos - 1] >= b[pos]) {
    if (b[pos - 1] >= b[pos] && ans[pos - 1][0] < b[pos]) {
      for (int i = 0; i < ans[pos - 1].size(); ++i) {
        ans[pos].push_back(ans[pos - 1][i]);
      }
      int sum = 0;
      for (int i = 0; i < ans[pos].size(); ++i) {
        sum += ans[pos][i];
      }
      int tar = b[pos] - 1;
      int i = 1;
      for (i = ans[pos].size() - 1; i >= 1; --i) {
        if (sum <= tar) break;
        if (ans[pos][i] < sum - tar) {
          sum -= ans[pos][i];
          ans[pos][i] = 0;
        } else {
          ans[pos][i] -= (sum - tar);
          sum -= (sum - tar);
        }
      }
      if (sum > 0) {
        bool flag = 0;
        int tt = i;
        for (; i >= 0; --i) {
          if (ans[pos][i] != 9) {
            ans[pos][i]++;
            flag = 1;
            sort(ans[pos].begin() + i + 1, ans[pos].end());
            break;
          }
        }
        if (!flag) {
          reverse(ans[pos].begin(), ans[pos].end());
          ans[pos].push_back(1);
          reverse(ans[pos].begin(), ans[pos].end());
          sort(ans[pos].begin() + 1, ans[pos].end());
        }
        return;
      }
    }
    ans[pos].push_back(1);
    for (int i = 0; i < ans[pos - 1].size(); ++i) {
      ans[pos].push_back(0);
    }
  } else {
    for (int i = 0; i < ans[pos - 1].size(); ++i) {
      ans[pos].push_back(ans[pos - 1][i]);
    }
  }
  int sum = 0;
  for (int i = 0; i < ans[pos].size(); ++i) {
    sum += ans[pos][i];
  }
  reverse(ans[pos].begin(), ans[pos].end());
  for (int i = 0; i < ans[pos].size(); ++i) {
    if (tot - sum >= 9 - ans[pos][i]) {
      sum += (9 - ans[pos][i]);
      ans[pos][i] = 9;
    } else {
      ans[pos][i] += tot - sum;
      sum += (tot - sum);
    }
    if (sum >= tot) break;
  }
  while (sum < tot) {
    if (tot - sum <= 9) {
      ans[pos].push_back(tot - sum);
      sum += tot - sum;
    } else {
      ans[pos].push_back(9);
      sum += 9;
    }
  }
  reverse(ans[pos].begin(), ans[pos].end());
}
int main() {
  int n;
  scanf("%d", &n);
  b[0] = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &b[i]);
  }
  ans[0].push_back(0);
  for (int i = 1; i <= n; ++i) {
    cnt(i, b[i]);
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < ans[i].size(); ++j) {
      cout << ans[i][j];
    }
    cout << endl;
  }
  return 0;
}
