def main(): from sys import stdin readline = stdin.readline n = int(readline()) for _ in range(n): d = int(readline()) ans = '9' + '0'*(d-1) print(ans) main()