import qualified Data.Vector                   as V
import qualified Data.Vector.Mutable           as VM

--for Primitive
import qualified Data.Vector.Unboxed           as VU
import qualified Data.Vector.Unboxed.Mutable   as VUM

-- import qualified Data.Foldable                 as F

-- Basic
import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Data.List
import Data.Maybe
import Data.Char
import Data.Ord

main :: IO ()
main = do
    k <- fst . fromJust <$> ( BS.readInt <$> BS.getLine ) :: IO Int
    s <- getLine
    putStr $ cut k s
    where
        cut k s 
            | (length s) <= k = s
            | otherwise = (take k s) ++ "..."