숫자 N은 아래와 같다.
N=2a x 3b x 5c x 7d x 11e
N이 주어질 때 a, b, c, d, e 를 출력하라.
N은 2 이상 10,000,000 이하이다.
가장 첫 줄에는 테스트 케이스의 개수 T가 주어지고, 그 아래로 각 테스트 케이스가 주어진다.
각 테스트 케이스의 첫 번째 줄에 N 이 주어진다.
출력의 각 줄은 '#t'로 시작하고, 공백을 한 칸 둔 다음 정답을 출력한다.
(t는 테스트 케이스의 번호를 의미하며 1부터 시작한다.)

#import sys
#sys.stdin = open("input.txt", "r")
T = int(input())
for test_case in range(1, T + 1):
a = 0; b = 0; c = 0; d = 0; e = 0;
case = int(input())
while case % 2 == 0 :
case = case / 2
a += 1;
while case % 3 == 0:
case = case / 3
b += 1;
while case % 5 == 0:
case = case / 5
c += 1;
while case % 7 == 0:
case = case / 7
d += 1;
while case % 11 == 0:
case = case / 11
e += 1;
print("#%d" %test_case, a, b, c, d, e )