import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


import static java.lang.System.in;

class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        int K = Integer.parseInt(reader.readLine());
        char[] ar = reader.readLine().toCharArray();
        if(ar.length<=K) System.out.println(new String(ar));
        else{
            String res="";
            for (int i = 0; i <K ; i++) {
                res=res+ar[i]+"";
            }
            res=res+"...";
            System.out.println(res);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import static java.lang.System.in; import static java.lang.System.in; import static java.lang.System.in; class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        int K = Integer.parseInt(reader.readLine());
        char[] ar = reader.readLine().toCharArray();
        if(ar.length<=K) System.out.println(new String(ar));
        else{
            String res="";
            for (int i = 0; i <K ; i++) {
                res=res+ar[i]+"";
            }
            res=res+"...";
            System.out.println(res);
        }
    }
} Main public static void main(String[] args)throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        int K = Integer.parseInt(reader.readLine());
        char[] ar = reader.readLine().toCharArray();
        if(ar.length<=K) System.out.println(new String(ar));
        else{
            String res="";
            for (int i = 0; i <K ; i++) {
                res=res+ar[i]+"";
            }
            res=res+"...";
            System.out.println(res);
        }
    } main {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        int K = Integer.parseInt(reader.readLine());
        char[] ar = reader.readLine().toCharArray();
        if(ar.length<=K) System.out.println(new String(ar));
        else{
            String res="";
            for (int i = 0; i <K ; i++) {
                res=res+ar[i]+"";
            }
            res=res+"...";
            System.out.println(res);
        }
    } BufferedReader reader = new BufferedReader(new InputStreamReader(in)); reader new BufferedReader(new InputStreamReader(in)) int K = Integer.parseInt(reader.readLine()); K Integer.parseInt(reader.readLine()) Integer.parseInt Integer reader.readLine() reader.readLine reader char[] ar = reader.readLine().toCharArray(); ar reader.readLine().toCharArray() reader.readLine().toCharArray reader.readLine() reader.readLine reader if(ar.length<=K) System.out.println(new String(ar));
        else{
            String res="";
            for (int i = 0; i <K ; i++) {
                res=res+ar[i]+"";
            }
            res=res+"...";
            System.out.println(res);
        } ar.length<=K ar.length ar ar.length K System.out.println(new String(ar)) System.out.println System.out System System.out new String(ar) {
            String res="";
            for (int i = 0; i <K ; i++) {
                res=res+ar[i]+"";
            }
            res=res+"...";
            System.out.println(res);
        } String res=""; res "" for (int i = 0; i <K ; i++) {
                res=res+ar[i]+"";
            } int i = 0; int i = 0; i 0 i <K i K i++ i++ i {
                res=res+ar[i]+"";
            } {
                res=res+ar[i]+"";
            } res=res+ar[i]+"" res res+ar[i]+"" res+ar[i]+"" res ar[i] ar i "" res=res+"..." res res+"..." res "..." System.out.println(res) System.out.println System.out System System.out res String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


import static java.lang.System.in;

class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        int K = Integer.parseInt(reader.readLine());
        char[] ar = reader.readLine().toCharArray();
        if(ar.length<=K) System.out.println(new String(ar));
        else{
            String res="";
            for (int i = 0; i <K ; i++) {
                res=res+ar[i]+"";
            }
            res=res+"...";
            System.out.println(res);
        }
    }
}
