#include <bits/stdc++.h>
using namespace std;
long long n, x, y, a[605], b[605];
void solve() {
  cin >> n;
  for (__typeof((n + 1)) i = (1); i < (n + 1); i++) {
    cin >> b[i];
    x = b[i] - b[i - 1];
    if (x <= 0) {
      x = -x + 1, y = 0;
      for (__typeof((605 - 1)) j = (605 - 1); j >= (0); j--) {
        if (y < x || a[j] == 9)
          y += a[j], a[j] = 0;
        else {
          a[j]++;
          break;
        }
      }
      x = y - x;
    }
    for (__typeof((605 - 1)) j = (605 - 1); j >= (0); j--)
      y = min(a[j] + x, 9ll), x -= y - a[j], a[j] = y;
    x = 0;
    while (!a[x]) x++;
    for (__typeof((605)) j = (x); j < (605); j++) cout << a[j];
    cout << "\n";
  }
}
void prep() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  prep();
  cout << fixed << setprecision(12);
  while (t--) solve();
  return 0;
}
