function Main(input){
    input=input.split("\n");  //ここまで必須
    var moji=input[1].length;
    var limit=input[0];

    if (moji<=limit){console.log(input[1])}
    else {console.log(input[1].slice(0,input[0])+"...")}
    
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));