import java.util.*;
import java.io.*;

class Main{
    public static void main(String args[])throws IOException{
        try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String input = br.readLine();

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

    }
} import java.util.*; util.* java import java.io.*; io.* java class Main{
    public static void main(String args[])throws IOException{
        try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String input = br.readLine();

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

    }
} Main public static void main(String args[])throws IOException{
        try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String input = br.readLine();

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

    } main {
        try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String input = br.readLine();

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

    } try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String input = br.readLine();

            if(K >= input.length()){
              System.out.println(input);
            }else{
              input = input.substring(0, K);
              input = input + "...";
              System.out.println(input);
            }
        } {
            int K = Integer.parseInt(br.readLine());
            String input = br.readLine();

            if(K >= input.length()){
              System.out.println(input);
            }else{
              input = input.substring(0, K);
              input = input + "...";
              System.out.println(input);
            }
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) 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 input = br.readLine(); input br.readLine() br.readLine br if(K >= input.length()){
              System.out.println(input);
            }else{
              input = input.substring(0, K);
              input = input + "...";
              System.out.println(input);
            } K >= input.length() K input.length() input.length input {
              System.out.println(input);
            } System.out.println(input) System.out.println System.out System System.out input {
              input = input.substring(0, K);
              input = input + "...";
              System.out.println(input);
            } input = input.substring(0, K) input input.substring(0, K) input.substring input 0 K input = input + "..." input input + "..." input "..." System.out.println(input) System.out.println System.out System System.out input String args[] args
import java.util.*;
import java.io.*;

class Main{
    public static void main(String args[])throws IOException{
        try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String input = br.readLine();

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

    }
}