import Data.List
import qualified Data.ByteString.Char8 as B
import qualified Data.Array.IArray as A
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 :: A.Array Int (Int,Int) -> Int -> Int -> Int
comb t n r
 | n < r = 0
 | otherwise = fst (t A.! n) *% snd (t A.! r) *% snd (t A.! (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 :: Int -> A.Array Int (Int,Int)
factTable n = A.listArray (0,n) (zip facts factInvs)
 where
  facts = scanl (\acc x -> acc *% x) 1 [1..n]
  factInvs = map (\x -> mod (pow x (q-2)) q) facts