import java.util.*;

class Main {
    private static Scanner sc;

    public static void main(final String[] args) {
        sc = new Scanner(System.in);
        int a = sc.nextInt();
        String N = sc.next(),ans = "...";
        if(N.length() <= a) System.out.println(N);
        else System.out.println(N.substring(0, a) + ans);
    }
}





 import java.util.*; util.* java class Main {
    private static Scanner sc;

    public static void main(final String[] args) {
        sc = new Scanner(System.in);
        int a = sc.nextInt();
        String N = sc.next(),ans = "...";
        if(N.length() <= a) System.out.println(N);
        else System.out.println(N.substring(0, a) + ans);
    }
} Main private static Scanner sc; sc public static void main(final String[] args) {
        sc = new Scanner(System.in);
        int a = sc.nextInt();
        String N = sc.next(),ans = "...";
        if(N.length() <= a) System.out.println(N);
        else System.out.println(N.substring(0, a) + ans);
    } main {
        sc = new Scanner(System.in);
        int a = sc.nextInt();
        String N = sc.next(),ans = "...";
        if(N.length() <= a) System.out.println(N);
        else System.out.println(N.substring(0, a) + ans);
    } sc = new Scanner(System.in) sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc String N = sc.next() N sc.next() sc.next sc ans = "..."; ans "..." if(N.length() <= a) System.out.println(N);
        else System.out.println(N.substring(0, a) + ans); N.length() <= a N.length() N.length N a System.out.println(N) System.out.println System.out System System.out N System.out.println(N.substring(0, a) + ans) System.out.println System.out System System.out N.substring(0, a) + ans N.substring(0, a) N.substring N 0 a ans final String[] args args
import java.util.*;

class Main {
    private static Scanner sc;

    public static void main(final String[] args) {
        sc = new Scanner(System.in);
        int a = sc.nextInt();
        String N = sc.next(),ans = "...";
        if(N.length() <= a) System.out.println(N);
        else System.out.println(N.substring(0, a) + ans);
    }
}






