import java.util.Scanner;

public class Main {

    private static final Scanner SCANNER = new Scanner(System.in);

    static int readOneInt() {
        String line = SCANNER.nextLine();
        return Integer.parseInt(line);
    }

    public static void main(String[] args) {

//        int tc = Integer.parseInt(SCANNER.nextLine());
        int tc = 1;
        for (int i = 0; i < tc; ++i) {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        }
    }

    private static void test(String s, int k) {
        if (s.length() <= k) {
            System.out.println(s);
        } else {
            System.out.println(s.substring(0, k) + "...");
        }

    }
}
 import java.util.Scanner; Scanner java.util public class Main {

    private static final Scanner SCANNER = new Scanner(System.in);

    static int readOneInt() {
        String line = SCANNER.nextLine();
        return Integer.parseInt(line);
    }

    public static void main(String[] args) {

//        int tc = Integer.parseInt(SCANNER.nextLine());
        int tc = 1;
        for (int i = 0; i < tc; ++i) {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        }
    }

    private static void test(String s, int k) {
        if (s.length() <= k) {
            System.out.println(s);
        } else {
            System.out.println(s.substring(0, k) + "...");
        }

    }
} Main private static final Scanner SCANNER = new Scanner(System.in); SCANNER new Scanner(System.in) static int readOneInt() {
        String line = SCANNER.nextLine();
        return Integer.parseInt(line);
    } readOneInt {
        String line = SCANNER.nextLine();
        return Integer.parseInt(line);
    } String line = SCANNER.nextLine(); line SCANNER.nextLine() SCANNER.nextLine SCANNER return Integer.parseInt(line); Integer.parseInt(line) Integer.parseInt Integer line public static void main(String[] args) {

//        int tc = Integer.parseInt(SCANNER.nextLine());
        int tc = 1;
        for (int i = 0; i < tc; ++i) {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        }
    } main {

//        int tc = Integer.parseInt(SCANNER.nextLine());
        int tc = 1;
        for (int i = 0; i < tc; ++i) {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        }
    } int tc = 1; tc 1 for (int i = 0; i < tc; ++i) {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        } int i = 0; int i = 0; i 0 i < tc i tc ++i ++i i {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        } {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        } int k = readOneInt(); k readOneInt() readOneInt String s = SCANNER.nextLine(); s SCANNER.nextLine() SCANNER.nextLine SCANNER test(s, k) test s k String[] args args private static void test(String s, int k) {
        if (s.length() <= k) {
            System.out.println(s);
        } else {
            System.out.println(s.substring(0, k) + "...");
        }

    } test {
        if (s.length() <= k) {
            System.out.println(s);
        } else {
            System.out.println(s.substring(0, k) + "...");
        }

    } if (s.length() <= k) {
            System.out.println(s);
        } else {
            System.out.println(s.substring(0, k) + "...");
        } s.length() <= k s.length() s.length s k {
            System.out.println(s);
        } System.out.println(s) System.out.println System.out System System.out s {
            System.out.println(s.substring(0, k) + "...");
        } System.out.println(s.substring(0, k) + "...") System.out.println System.out System System.out s.substring(0, k) + "..." s.substring(0, k) s.substring s 0 k "..." String s s int k k public class Main {

    private static final Scanner SCANNER = new Scanner(System.in);

    static int readOneInt() {
        String line = SCANNER.nextLine();
        return Integer.parseInt(line);
    }

    public static void main(String[] args) {

//        int tc = Integer.parseInt(SCANNER.nextLine());
        int tc = 1;
        for (int i = 0; i < tc; ++i) {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        }
    }

    private static void test(String s, int k) {
        if (s.length() <= k) {
            System.out.println(s);
        } else {
            System.out.println(s.substring(0, k) + "...");
        }

    }
} public class Main {

    private static final Scanner SCANNER = new Scanner(System.in);

    static int readOneInt() {
        String line = SCANNER.nextLine();
        return Integer.parseInt(line);
    }

    public static void main(String[] args) {

//        int tc = Integer.parseInt(SCANNER.nextLine());
        int tc = 1;
        for (int i = 0; i < tc; ++i) {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        }
    }

    private static void test(String s, int k) {
        if (s.length() <= k) {
            System.out.println(s);
        } else {
            System.out.println(s.substring(0, k) + "...");
        }

    }
} Main
import java.util.Scanner;

public class Main {

    private static final Scanner SCANNER = new Scanner(System.in);

    static int readOneInt() {
        String line = SCANNER.nextLine();
        return Integer.parseInt(line);
    }

    public static void main(String[] args) {

//        int tc = Integer.parseInt(SCANNER.nextLine());
        int tc = 1;
        for (int i = 0; i < tc; ++i) {
            int k = readOneInt();
            String s = SCANNER.nextLine();
            test(s, k);
        }
    }

    private static void test(String s, int k) {
        if (s.length() <= k) {
            System.out.println(s);
        } else {
            System.out.println(s.substring(0, k) + "...");
        }

    }
}

