import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc168_b solver = new abc168_b();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc168_b {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int K = in.nextInt();
            String S = in.next();
            String dash = "";
            if (S.length() > K) {
                dash = "...";
                out.print(S.substring(0, K));
            } else {
                out.print(S);
            }
            out.println(dash);
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc168_b solver = new abc168_b();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc168_b {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int K = in.nextInt();
            String S = in.next();
            String dash = "";
            if (S.length() > K) {
                dash = "...";
                out.print(S.substring(0, K));
            } else {
                out.print(S);
            }
            out.println(dash);
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc168_b solver = new abc168_b();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc168_b solver = new abc168_b();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) abc168_b solver = new abc168_b(); solver new abc168_b() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class abc168_b {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int K = in.nextInt();
            String S = in.next();
            String dash = "";
            if (S.length() > K) {
                dash = "...";
                out.print(S.substring(0, K));
            } else {
                out.print(S);
            }
            out.println(dash);
        }

    } abc168_b public void solve(int testNumber, Scanner in, PrintWriter out) {
            int K = in.nextInt();
            String S = in.next();
            String dash = "";
            if (S.length() > K) {
                dash = "...";
                out.print(S.substring(0, K));
            } else {
                out.print(S);
            }
            out.println(dash);
        } solve {
            int K = in.nextInt();
            String S = in.next();
            String dash = "";
            if (S.length() > K) {
                dash = "...";
                out.print(S.substring(0, K));
            } else {
                out.print(S);
            }
            out.println(dash);
        } int K = in.nextInt(); K in.nextInt() in.nextInt in String S = in.next(); S in.next() in.next in String dash = ""; dash "" if (S.length() > K) {
                dash = "...";
                out.print(S.substring(0, K));
            } else {
                out.print(S);
            } S.length() > K S.length() S.length S K {
                dash = "...";
                out.print(S.substring(0, K));
            } dash = "..." dash "..." out.print(S.substring(0, K)) out.print out S.substring(0, K) S.substring S 0 K {
                out.print(S);
            } out.print(S) out.print out S out.println(dash) out.println out dash int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc168_b solver = new abc168_b();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc168_b {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int K = in.nextInt();
            String S = in.next();
            String dash = "";
            if (S.length() > K) {
                dash = "...";
                out.print(S.substring(0, K));
            } else {
                out.print(S);
            }
            out.println(dash);
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc168_b solver = new abc168_b();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc168_b {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int K = in.nextInt();
            String S = in.next();
            String dash = "";
            if (S.length() > K) {
                dash = "...";
                out.print(S.substring(0, K));
            } else {
                out.print(S);
            }
            out.println(dash);
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc168_b solver = new abc168_b();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc168_b {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int K = in.nextInt();
            String S = in.next();
            String dash = "";
            if (S.length() > K) {
                dash = "...";
                out.print(S.substring(0, K));
            } else {
                out.print(S);
            }
            out.println(dash);
        }

    }
}

