#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const int MOD = 1000000007;
const double pi = acos(-1.0);
string get(string last, int sum) {
  for (int i = (int)((last).size()) - 1; i >= 0; --i)
    for (int d = (last[i] - '0' + 1); d <= (9); ++d) {
      int have = d;
      for (int j = (0); j <= (i - 1); ++j) have += last[j] - '0';
      if (have <= sum && have + 9 * ((int)((last).size()) - i - 1) >= sum) {
        last[i] = d + '0';
        sum -= have;
        for (int j = (int)((last).size()) - 1; j > i; --j) {
          int cur = min(sum, 9);
          last[j] = cur + '0';
          sum -= cur;
        }
        return last;
      }
    }
  for (int len = (int)((last).size()) + 1;; ++len) {
    if (9 * len >= sum) {
      string ans = "";
      int now = 0;
      for (int pos = (1); pos <= (len); ++pos)
        for (int d = ((pos == 1 ? 1 : 0)); d <= (9); ++d) {
          if (now + d <= sum && now + d + 9 * (len - pos) >= sum) {
            ans += char(d + '0');
            now += d;
            break;
          }
        }
      return ans;
    }
  }
}
int b[311];
string ans[311];
int main() {
  int n;
  cin >> n;
  for (int i = (1); i <= (n); ++i) cin >> b[i];
  ans[0] = "0";
  for (int i = (1); i <= (n); ++i) {
    ans[i] = get(ans[i - 1], b[i]);
  }
  for (int i = (1); i <= (n); ++i) cout << ans[i] << endl;
}
