#include <bits/stdc++.h>
using namespace std;
const int MAXN = 305;
int b[MAXN];
int a[505], l, n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &b[i]);
  }
  int t1 = b[1] / 9;
  int t2 = b[1] - t1 * 9;
  for (int i = 1; i <= t1; i++) {
    a[i] = 9;
  }
  a[t1 + 1] = t2;
  if (t2 == 0)
    l = t1;
  else
    l = t1 + 1;
  for (int i = l; i >= 1; i--) {
    printf("%d", a[i]);
  }
  printf("\n");
  for (int i = 2; i <= n; i++) {
    int sum = b[i - 1];
    int j = 0;
    while (true) {
      j++;
      if (j > l) l = j;
      bool ok = false;
      for (int k = 1; k <= 9; k++) {
        if (a[j] + k > 9) break;
        int s = sum + k;
        if (b[i] - s >= 0 && b[i] - s <= 9 * (j - 1)) {
          a[j] = a[j] + k;
          int x = b[i] - s;
          int t1 = x / 9;
          int t2 = x - 9 * t1;
          if (x != 0) {
            for (int u = 1; u <= t1; u++) {
              a[u] = 9;
            }
            int c = t1 + 1;
            if (t2 != 0) a[t1 + 1] = t2, c = t1 + 2;
            for (int u = c; u <= j - 1; u++) {
              a[u] = 0;
            }
          } else {
            for (int u = 1; u <= j - 1; u++) {
              a[u] = 0;
            }
          }
          ok = true;
          for (int u = l; u >= 1; u--) {
            printf("%d", a[u]);
          }
          printf("\n");
          break;
        }
      }
      if (ok) break;
      sum -= a[j];
    }
  }
}
