#!/usr/bin/env python3 # from typing import * def main(): N = int(input()) d = [None for _ in range(N)] for i in range(N): d[i] = int(input()) for i in range(N): print(10 ** d[i] - 10 ** (d[i] - 1)) if __name__ == '__main__': main()