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

fact n = product [1..n]

comb n r = div (fact n) (fact r * fact (n-r))