"use strict";

const main = arg => {
    const inputList = arg.trim().split("\n");
    // 回答を記述
    const K = inputList[0];
    const S = inputList[1];

    if (S.length <= K) {
        console.log(S)
    } else {
        console.log(S.slice(0, K).concat("..."))
    }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));