function Main(input) {
    var rows = input.split("\n");
    var K = parseInt(rows[0], 10);
    var S = rows[1];
    var sub = '';
    if (S.length <= K) {
        sub = S;
    } else {
        sub = S.substr(0, K) + '...';
    }
    console.log('%s', sub);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
