solve :: String -> Int -> String
solve s k
 | length s > k = (take k s) ++ "..."
 | otherwise = s 

main :: IO ()
main = do
 k <- read <$> getLine :: IO Int
 s <- getLine :: IO String
 putStr $ solve s k