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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int k = Integer.parseInt(br.readLine());
        String s = br.readLine();
        if(s.length() > k) {
            s = s.substring(0,k);
            s += "...";
        }
        System.out.println(s);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int k = Integer.parseInt(br.readLine());
        String s = br.readLine();
        if(s.length() > k) {
            s = s.substring(0,k);
            s += "...";
        }
        System.out.println(s);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int k = Integer.parseInt(br.readLine());
        String s = br.readLine();
        if(s.length() > k) {
            s = s.substring(0,k);
            s += "...";
        }
        System.out.println(s);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int k = Integer.parseInt(br.readLine());
        String s = br.readLine();
        if(s.length() > k) {
            s = s.substring(0,k);
            s += "...";
        }
        System.out.println(s);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int k = Integer.parseInt(br.readLine()); k Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String s = br.readLine(); s br.readLine() br.readLine br if(s.length() > k) {
            s = s.substring(0,k);
            s += "...";
        } s.length() > k s.length() s.length s k {
            s = s.substring(0,k);
            s += "...";
        } s = s.substring(0,k) s s.substring(0,k) s.substring s 0 k s += "..." s "..." System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int k = Integer.parseInt(br.readLine());
        String s = br.readLine();
        if(s.length() > k) {
            s = s.substring(0,k);
            s += "...";
        }
        System.out.println(s);
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int k = Integer.parseInt(br.readLine());
        String s = br.readLine();
        if(s.length() > k) {
            s = s.substring(0,k);
            s += "...";
        }
        System.out.println(s);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int k = Integer.parseInt(br.readLine());
        String s = br.readLine();
        if(s.length() > k) {
            s = s.substring(0,k);
            s += "...";
        }
        System.out.println(s);
    }
}
