#include <bits/stdc++.h>
using namespace std;
int main()
{
long long ss[25]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97};
long long s;
cin>>s;
long long n;
while(s--) {
cin>>n;
long long sum=0;
for(long long i=0;ss[i]<=n&&i<=24;i++)
{
if(n%ss[i]==0)
{
cout<<ss[i]<<' ';
sum=1;
}
}
if(sum==0)
cout<<"Terrible Silence...";
cout<<endl;
}
return 0;
}