import Control.Applicative import Control.Monad import System.IO testPassword :: String -> Int testPassword = go ["0123456789", "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "!@#$%^&*()-+"] 0 where go :: [String] -> Int -> String -> Int go [] t s = max t (6 - (length s)) go (x:xs) t s = go xs (t + (foldl (\acc c -> if (acc==0 || c `elem` s) then 0 else acc) 1 x)) s main :: IO () main = do n_temp <- getLine let n = read n_temp :: Int password <- getLine putStrLn $ show (testPassword password) getMultipleLines :: Int -> IO [String] getMultipleLines n | n <= 0 = return [] | otherwise = do x <- getLine xs <- getMultipleLines (n-1) let ret = (x:xs) return ret