function main(lines) {
    const input = lines.split('\n')
    const K = input[0]-0
    const S = input[1].split('')
    
    if(S.length <= K){
        console.log(S.join(''))
    } else {
        S.splice(K)
        console.log(S.join('') + '...')
    }
    
}

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