"use strict"
const assert = require('assert');

function main(input) {
    let ret = check(input);
    console.log(ret);
}

function check(input) {
    let ans;
    let [k, s] = input.split("\n");
    k = parseInt(k);
    if (s.length <= k) {
        ans = s;
    } else if (s.length > k) {
        let sliceS = s.slice(0, k) + "...";
        ans = sliceS;
    }
    return ans;
}

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

// check
// var answer;

// input = `7
// nikoandsolstice`;
// answer = `nikoand...`;
// assert.equal(check(input), answer);

// input = `40
// ferelibenterhominesidquodvoluntcredunt`;
// answer = `ferelibenterhominesidquodvoluntcredunt`;
// assert.equal(check(input), answer);
