import Data.List
import qualified Data.ByteString.Char8 as B
import Data.IntMap.Strict ((!))
import qualified Data.IntMap.Strict as M
import Data.Maybe

q = 10^9+7

(*%) x y = mod (x*y) q

main = do
 n <- readLn
 as <- map (fst. fromJust .  B.readInteger) . B.words <$> B.getLine
 mapM_ (print . (`mod` q) . ss n as) [1..n+1]

ss n as k = comb t (n+1) k - comb t (n-(j-i)) (k-1)
 where
  [(i,_),(j,_)] = sort . head . filter ((==2) . length) . groupBy (\(_,x) (_,y) -> x==y) . sortOn snd . zip [0..] $ as
  t = factTable (n+1)

comb t n r
 | n < r = 0
 | otherwise = fst (t!n) *% snd (t!r) *% snd (t!(n-r))

pow x n
 | n == 0 = 1
 | odd n = x *% pow x (n-1)
 | otherwise = mod ((pow x (div n 2))^2) q

factTable n = M.fromDistinctAscList $ zipWith3 (\i f fi -> (i,(f,fi))) [0..n] facts factInvs
 where
  facts = scanl (\acc x -> acc *% x) 1 [1..n]
  factInvs = map (\x -> mod (pow x (q-2)) q) facts