import qualified Data.ByteString.Char8 as BS
import           Data.Maybe (fromJust)

main :: IO ()
main = do
  k <- getInt
  s <- BS.getLine
  let ans
        | BS.length s > k = BS.take k s `BS.append` BS.pack "..."
        | otherwise = s
  BS.putStrLn ans

getInt :: IO Int
getInt = fst . fromJust . BS.readInt <$> BS.getLine
