function main(input) {
    var args = input
        .trim()
        .split('\n');
    var length = parseInt(args[0]);
    if (length >= args[1].length) {
        console.log(args[1]);
    } else {
        console.log(args[1].substr(0, length) + '...');
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
