import java.util.*;

public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      int num = sc.nextInt();
      String str = sc.next();
      if(str.length() > num){
        str = str.substring(0, num) + "...";
      }
      System.out.println(str);
    }
} import java.util.*; util.* java public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      int num = sc.nextInt();
      String str = sc.next();
      if(str.length() > num){
        str = str.substring(0, num) + "...";
      }
      System.out.println(str);
    }
} Main public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      int num = sc.nextInt();
      String str = sc.next();
      if(str.length() > num){
        str = str.substring(0, num) + "...";
      }
      System.out.println(str);
    } main {
      Scanner sc = new Scanner(System.in);
      int num = sc.nextInt();
      String str = sc.next();
      if(str.length() > num){
        str = str.substring(0, num) + "...";
      }
      System.out.println(str);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc String str = sc.next(); str sc.next() sc.next sc if(str.length() > num){
        str = str.substring(0, num) + "...";
      } str.length() > num str.length() str.length str num {
        str = str.substring(0, num) + "...";
      } str = str.substring(0, num) + "..." str str.substring(0, num) + "..." str.substring(0, num) str.substring str 0 num "..." System.out.println(str) System.out.println System.out System System.out str String args[] args public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      int num = sc.nextInt();
      String str = sc.next();
      if(str.length() > num){
        str = str.substring(0, num) + "...";
      }
      System.out.println(str);
    }
} public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      int num = sc.nextInt();
      String str = sc.next();
      if(str.length() > num){
        str = str.substring(0, num) + "...";
      }
      System.out.println(str);
    }
} Main
import java.util.*;

public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      int num = sc.nextInt();
      String str = sc.next();
      if(str.length() > num){
        str = str.substring(0, num) + "...";
      }
      System.out.println(str);
    }
}