import qualified Data.ByteString.Char8 as B
import Data.Maybe(fromJust)
import Data.List
main = mapM print.solve.map(fst.fromJust.B.readInt).B.words=<<B.getContents
solve(n:xs)=map((`mod`(10^9+7)).length.nub.(`comb`xs))[1..n+1]
comb 0 ls=[[]]
comb n ls=[x:ys|(x:xs)<-tails ls,ys<-comb(n-1)xs]