n:stdin.get_s(3).to_i;n.times{|i|s:"";n.times{a:i+1;b:it+1;while(b>0)a,b=b,a%b;s~=a<2?"t":" ";}s.p;}