#include <bits/stdc++.h>
std::vector<int> inc_and_carry(std::vector<int> ds, int i) {
  while (ds[i] == 9) --i;
  ++ds[i];
  for (int j = ds.size() - 1; j > i; --j) ds[j] = 0;
  if (ds[0]) ds.insert(ds.begin(), 0);
  return ds;
}
std::vector<int> reduce_digit_sum(std::vector<int> ds, int b) {
  int acc = 0, i = 0;
  for (;; ++i) {
    if ((acc += ds[i]) >= b) {
      if (ds[i] != 9) --i;
      break;
    }
  }
  return inc_and_carry(ds, i);
}
std::vector<int> inc_to_digit_sum(std::vector<int> ds, int b) {
  int s = 0;
  for (int d : ds) s += d;
  for (int i = ds.size() - 1; i >= 0; --i) {
    int delta = std::min(9 - ds[i], b - s);
    s += delta, ds[i] += delta;
  }
  while (s < b) ds.insert(ds.begin(), std::min(9, b - s)), s += 9;
  if (ds[0]) ds.insert(ds.begin(), 0);
  return ds;
}
std::vector<int> next(std::vector<int> ds, int b) {
  int s = 0;
  for (int d : ds) s += d;
  if (s == b) {
    ds = inc_and_carry(ds, ds.size() - 1);
    s = 0;
    for (int d : ds) s += d;
  }
  if (s > b) ds = reduce_digit_sum(ds, b);
  return inc_to_digit_sum(ds, b);
}
int main() {
  int N;
  std::cin >> N;
  std::vector<int> ds{0}, B(N);
  for (int& b : B) std::cin >> b;
  for (int b : B) {
    ds = next(ds, b);
    for (int i = 1; i < (int)ds.size(); ++i) std::cout << ds[i];
    std::cout << '\n';
  }
}
