import Control.Monad                                                                                          |ABC109/kappahouse/b.hs:6:    w <- forM [1..n] $ \i -> getLine
                                                                                                              |GCJ12QUAL/kappahouse/a.hs:5:main = getLine >>= \n -> forM_ [1..read n] $ \c ->
main = do                                                                                                     |GCJ12QUAL/kappahouse/b.hs:6:    forM_ [1..read n] $ \c -> do
    [n, m] <- fmap read <$> words <$> getLine                                                                 |GCJ12QUAL/kappahouse/b_failed.hs:6:    forM_ [1..read n] $ \c -> do
    ka <- forM [1..n] $ \i -> do                                                                              |GCJ12QUAL/kappahouse/b_failed2.hs:6:    forM_ [1..read n] $ \c -> do
        (k : a) <- fmap read <$> words <$> getLine                                                            |GCJ19QUAL/kappahouse/a.hs:5:    forM_ [1..read cases] $ \c -> do
        return (k, a)                                                                                         |GCJ19QUAL/kappahouse/b.hs:6:    forM_ [1..read cases] $ \c -> do
    putStrLn $ show $ solve n m ka                                                                            |GCJ19QUAL/kappahouse/b_clean.hs:5:    forM_ [1 .. cases] $ \c -> do
                                                                                                              |GCJ19QUAL/kappahouse/b_notdirty.hs:8:    forM_ [1..read cases] $ \c -> do
solve :: Int -> Int -> [(Int, [Int])] -> Int                                                                  |GCJ19QUAL/kappahouse/c.hs:9:    forM_ [1..read cases] $ \c -> do
solve n m ka = length $ filter (== n) $ map count [1 .. m]                                                    |GCJ19QUAL/kappahouse/c_failed.hs:9:    forM_ [1..read cases] $ \c -> do
  where                                                                                                       |GCJ19QUAL/kappahouse/d_clean.hs:8:    forM_ [1 .. read cases] $ \c -> do
    count f = length $ filter (any (== f)) $ map snd ka   