import java.util.Scanner;

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

public class Main {
    public static void  main(String args[]){
        Scanner sc = new Scanner(System.in);
        int K = sc.nextInt();
        String S = sc.next();
        sc.close();
        if(S.length() > K){
            String s = S.substring(0,K);
            S = s + "...";
        }
        System.out.println(S);
    }
}
