import Data.List

q = 10^9+7

main = do
 n <- readLn
 as <- map read . words <$> getLine :: IO [Int]
 mapM_ (print . (`mod` q) . ss n as) [1..n+1]

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

fact n = foldr (\x acc -> mod (x*acc) q) 1 [1..n]

comb n r
 | n < r = 0
 | otherwise = fact n * pow (fact r) (q-2) * pow (fact (n-r)) (q-2)

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