import java.util.Scanner;

class Main{
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        String str = sc.next();

        String answer;

        if (str.length()<= length){
            answer = str;
        }else{
            answer = str.substring(0, length) + "...";
        }
        System.out.println(answer);
    }
} import java.util.Scanner; Scanner java.util class Main{
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        String str = sc.next();

        String answer;

        if (str.length()<= length){
            answer = str;
        }else{
            answer = str.substring(0, length) + "...";
        }
        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        String str = sc.next();

        String answer;

        if (str.length()<= length){
            answer = str;
        }else{
            answer = str.substring(0, length) + "...";
        }
        System.out.println(answer);
    } main {
        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        String str = sc.next();

        String answer;

        if (str.length()<= length){
            answer = str;
        }else{
            answer = str.substring(0, length) + "...";
        }
        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int length = sc.nextInt(); length sc.nextInt() sc.nextInt sc String str = sc.next(); str sc.next() sc.next sc String answer; answer if (str.length()<= length){
            answer = str;
        }else{
            answer = str.substring(0, length) + "...";
        } str.length()<= length str.length() str.length str length {
            answer = str;
        } answer = str answer str {
            answer = str.substring(0, length) + "...";
        } answer = str.substring(0, length) + "..." answer str.substring(0, length) + "..." str.substring(0, length) str.substring str 0 length "..." System.out.println(answer) System.out.println System.out System System.out answer String[] args args
import java.util.Scanner;

class Main{
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        String str = sc.next();

        String answer;

        if (str.length()<= length){
            answer = str;
        }else{
            answer = str.substring(0, length) + "...";
        }
        System.out.println(answer);
    }
}