import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int K = scan.nextInt();

        Scanner scan2 = new Scanner(System.in);
        String S = scan.next();

        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 {

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int K = scan.nextInt();

        Scanner scan2 = new Scanner(System.in);
        String S = scan.next();

        if (S.length()<=K ){
            System.out.println(S);
        }else{
            System.out.println(S.substring(0,K)+"...");
        }


    }

} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int K = scan.nextInt();

        Scanner scan2 = new Scanner(System.in);
        String S = scan.next();

        if (S.length()<=K ){
            System.out.println(S);
        }else{
            System.out.println(S.substring(0,K)+"...");
        }


    } main {
        Scanner scan = new Scanner(System.in);
        int K = scan.nextInt();

        Scanner scan2 = new Scanner(System.in);
        String S = scan.next();

        if (S.length()<=K ){
            System.out.println(S);
        }else{
            System.out.println(S.substring(0,K)+"...");
        }


    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int K = scan.nextInt(); K scan.nextInt() scan.nextInt scan Scanner scan2 = new Scanner(System.in); scan2 new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan 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[] args args public class Main {

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int K = scan.nextInt();

        Scanner scan2 = new Scanner(System.in);
        String S = scan.next();

        if (S.length()<=K ){
            System.out.println(S);
        }else{
            System.out.println(S.substring(0,K)+"...");
        }


    }

} public class Main {

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int K = scan.nextInt();

        Scanner scan2 = new Scanner(System.in);
        String S = scan.next();

        if (S.length()<=K ){
            System.out.println(S);
        }else{
            System.out.println(S.substring(0,K)+"...");
        }


    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int K = scan.nextInt();

        Scanner scan2 = new Scanner(System.in);
        String S = scan.next();

        if (S.length()<=K ){
            System.out.println(S);
        }else{
            System.out.println(S.substring(0,K)+"...");
        }


    }

}
