import java.util.*;

class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int cnt = sc.nextInt();
      String str = sc.next();
	  //Sの長さを求める
      int len = str.length();
      if(len <= cnt)
      {
      	 System.out.println(str);
      }
      else
      {
      	String new_str = str.substring(0, cnt);
        new_str += "...";
        System.out.println(new_str);
      
      }
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int cnt = sc.nextInt();
      String str = sc.next();
	  //Sの長さを求める
      int len = str.length();
      if(len <= cnt)
      {
      	 System.out.println(str);
      }
      else
      {
      	String new_str = str.substring(0, cnt);
        new_str += "...";
        System.out.println(new_str);
      
      }
    }
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int cnt = sc.nextInt();
      String str = sc.next();
	  //Sの長さを求める
      int len = str.length();
      if(len <= cnt)
      {
      	 System.out.println(str);
      }
      else
      {
      	String new_str = str.substring(0, cnt);
        new_str += "...";
        System.out.println(new_str);
      
      }
    } main {
      Scanner sc = new Scanner(System.in);
      int cnt = sc.nextInt();
      String str = sc.next();
	  //Sの長さを求める
      int len = str.length();
      if(len <= cnt)
      {
      	 System.out.println(str);
      }
      else
      {
      	String new_str = str.substring(0, cnt);
        new_str += "...";
        System.out.println(new_str);
      
      }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int cnt = sc.nextInt(); cnt sc.nextInt() sc.nextInt sc String str = sc.next(); str sc.next() sc.next sc int len = str.length(); len str.length() str.length str if(len <= cnt)
      {
      	 System.out.println(str);
      }
      else
      {
      	String new_str = str.substring(0, cnt);
        new_str += "...";
        System.out.println(new_str);
      
      } len <= cnt len cnt {
      	 System.out.println(str);
      } System.out.println(str) System.out.println System.out System System.out str {
      	String new_str = str.substring(0, cnt);
        new_str += "...";
        System.out.println(new_str);
      
      } String new_str = str.substring(0, cnt); new_str str.substring(0, cnt) str.substring str 0 cnt new_str += "..." new_str "..." System.out.println(new_str) System.out.println System.out System System.out new_str String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int cnt = sc.nextInt();
      String str = sc.next();
	  //Sの長さを求める
      int len = str.length();
      if(len <= cnt)
      {
      	 System.out.println(str);
      }
      else
      {
      	String new_str = str.substring(0, cnt);
        new_str += "...";
        System.out.println(new_str);
      
      }
    }
}