function Main(input) {
    input = input.split("\n");
    const result = input[1].slice(0,input[0])
    if(result == input[1]) console.log(result);
    else console.log(result + "...")
}
Main("40\nferelibenterhominesidquodvoluntcredunt")