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