import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int K = sc.nextInt();
      	String s = sc.next();
     	int howlong = s.length();	

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

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

      if(K < howlong){
      	s = s.substring(0,K) + "..." ;
      }        
		System.out.println(s);
	} main {
		Scanner sc = new Scanner(System.in);
		int K = sc.nextInt();
      	String s = sc.next();
     	int howlong = s.length();	

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

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

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

      if(K < howlong){
      	s = s.substring(0,K) + "..." ;
      }        
		System.out.println(s);
	}
 
}