process.stdin.resume();
process.stdin.setEncoding('utf8');
var lines = [];
var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout,
    terminal: false
});
reader.on('line', (line) => {
    lines.push(line);
});
reader.on('close', () => {
    let K = parseInt(lines[0]);
    const S = lines[1];
    const s = S.length <= K ? S : S.slice(0,K) + "...";
    console.log(s);
});