import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int K=scan.nextInt();
        String N=scan.next();
        String append="...";
        if(N.length()<=K){
            System.out.println(N);
        }
        else if(N.length()>K){
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int K=scan.nextInt();
        String N=scan.next();
        String append="...";
        if(N.length()<=K){
            System.out.println(N);
        }
        else if(N.length()>K){
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int K=scan.nextInt();
        String N=scan.next();
        String append="...";
        if(N.length()<=K){
            System.out.println(N);
        }
        else if(N.length()>K){
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int K=scan.nextInt();
        String N=scan.next();
        String append="...";
        if(N.length()<=K){
            System.out.println(N);
        }
        else if(N.length()>K){
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int K=scan.nextInt(); K scan.nextInt() scan.nextInt scan String N=scan.next(); N scan.next() scan.next scan String append="..."; append "..." if(N.length()<=K){
            System.out.println(N);
        }
        else if(N.length()>K){
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        } N.length()<=K N.length() N.length N K {
            System.out.println(N);
        } System.out.println(N) System.out.println System.out System System.out N if(N.length()>K){
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        } N.length()>K N.length() N.length N K {
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        } for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            } int i=0; int i=0; i 0 i<K i K i++ i++ i {
                System.out.print(N.charAt(i));
            } {
                System.out.print(N.charAt(i));
            } System.out.print(N.charAt(i)) System.out.print System.out System System.out N.charAt(i) N.charAt N i System.out.print(append) System.out.print System.out System System.out append String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int K=scan.nextInt();
        String N=scan.next();
        String append="...";
        if(N.length()<=K){
            System.out.println(N);
        }
        else if(N.length()>K){
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int K=scan.nextInt();
        String N=scan.next();
        String append="...";
        if(N.length()<=K){
            System.out.println(N);
        }
        else if(N.length()>K){
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        }
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int K=scan.nextInt();
        String N=scan.next();
        String append="...";
        if(N.length()<=K){
            System.out.println(N);
        }
        else if(N.length()>K){
            for(int i=0; i<K;i++){
                System.out.print(N.charAt(i));
            }
            System.out.print(append);
        }
    }
}
