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

public class Main{
    public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            int K = Integer.valueOf(reader.readLine());
            String S = reader.readLine();
            int Slen = S.length();
            String ans;
            if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            }
            System.out.println(ans);
        }catch(IOException e){
            System.out.println("aaaa");
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
    public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            int K = Integer.valueOf(reader.readLine());
            String S = reader.readLine();
            int Slen = S.length();
            String ans;
            if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            }
            System.out.println(ans);
        }catch(IOException e){
            System.out.println("aaaa");
        }
    }
} Main public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            int K = Integer.valueOf(reader.readLine());
            String S = reader.readLine();
            int Slen = S.length();
            String ans;
            if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            }
            System.out.println(ans);
        }catch(IOException e){
            System.out.println("aaaa");
        }
    } main {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            int K = Integer.valueOf(reader.readLine());
            String S = reader.readLine();
            int Slen = S.length();
            String ans;
            if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            }
            System.out.println(ans);
        }catch(IOException e){
            System.out.println("aaaa");
        }
    } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) try{
            int K = Integer.valueOf(reader.readLine());
            String S = reader.readLine();
            int Slen = S.length();
            String ans;
            if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            }
            System.out.println(ans);
        }catch(IOException e){
            System.out.println("aaaa");
        } catch(IOException e){
            System.out.println("aaaa");
        } IOException e {
            System.out.println("aaaa");
        } System.out.println("aaaa") System.out.println System.out System System.out "aaaa" {
            int K = Integer.valueOf(reader.readLine());
            String S = reader.readLine();
            int Slen = S.length();
            String ans;
            if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            }
            System.out.println(ans);
        } int K = Integer.valueOf(reader.readLine()); K Integer.valueOf(reader.readLine()) Integer.valueOf Integer reader.readLine() reader.readLine reader String S = reader.readLine(); S reader.readLine() reader.readLine reader int Slen = S.length(); Slen S.length() S.length S String ans; ans if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            } Slen>K Slen K {
                ans = S.substring(0,K)+"...";
            } ans = S.substring(0,K)+"..." ans S.substring(0,K)+"..." S.substring(0,K) S.substring S 0 K "..." {
                ans = S;
            } ans = S ans S System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
    public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            int K = Integer.valueOf(reader.readLine());
            String S = reader.readLine();
            int Slen = S.length();
            String ans;
            if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            }
            System.out.println(ans);
        }catch(IOException e){
            System.out.println("aaaa");
        }
    }
} public class Main{
    public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            int K = Integer.valueOf(reader.readLine());
            String S = reader.readLine();
            int Slen = S.length();
            String ans;
            if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            }
            System.out.println(ans);
        }catch(IOException e){
            System.out.println("aaaa");
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
    public static void main(String[] args){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            int K = Integer.valueOf(reader.readLine());
            String S = reader.readLine();
            int Slen = S.length();
            String ans;
            if(Slen>K){
                ans = S.substring(0,K)+"...";
            }else{
                ans = S;
            }
            System.out.println(ans);
        }catch(IOException e){
            System.out.println("aaaa");
        }
    }
}