function B168(_input) {
    var lines = _input.split("\n");
    var k = parseInt(lines.shift(),10);
    var s = lines.shift();

    if (s.length <= k) {
        console.log(s);
        return;
    }

    var str = s.slice(0, k) + '...';

    console.log(str);
}
B168(require("fs").readFileSync("/dev/stdin", "utf8"));