<?php
$k = trim(fgets(STDIN));
$s = str_split(fgets(STDIN));
if (count($s) <= $k) {
    echo trim(implode($s));
} else {
    $arr = [];
    $arr = array_slice($s, 0, $k);
    array_push($arr, "...");
    echo trim(implode($arr));
}