import 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();
  
  if(s.length()<=k)
    System.out.println(s);
  
  else
  {
		s=s.substring(0,k) +"...";
      System.out.print(s);
    
  }
  
 
}
} import java.util.*; util.* java public class Main{
public static void main(String[] args)
{
	Scanner sc=new Scanner(System.in);
  int k=sc.nextInt();
  String s=sc.next();
  
  if(s.length()<=k)
    System.out.println(s);
  
  else
  {
		s=s.substring(0,k) +"...";
      System.out.print(s);
    
  }
  
 
}
} Main public static void main(String[] args)
{
	Scanner sc=new Scanner(System.in);
  int k=sc.nextInt();
  String s=sc.next();
  
  if(s.length()<=k)
    System.out.println(s);
  
  else
  {
		s=s.substring(0,k) +"...";
      System.out.print(s);
    
  }
  
 
} main {
	Scanner sc=new Scanner(System.in);
  int k=sc.nextInt();
  String s=sc.next();
  
  if(s.length()<=k)
    System.out.println(s);
  
  else
  {
		s=s.substring(0,k) +"...";
      System.out.print(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 if(s.length()<=k)
    System.out.println(s);
  
  else
  {
		s=s.substring(0,k) +"...";
      System.out.print(s);
    
  } s.length()<=k s.length() s.length s k System.out.println(s) System.out.println System.out System System.out s {
		s=s.substring(0,k) +"...";
      System.out.print(s);
    
  } s=s.substring(0,k) +"..." s s.substring(0,k) +"..." s.substring(0,k) s.substring s 0 k "..." System.out.print(s) System.out.print 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();
  
  if(s.length()<=k)
    System.out.println(s);
  
  else
  {
		s=s.substring(0,k) +"...";
      System.out.print(s);
    
  }
  
 
}
} public class Main{
public static void main(String[] args)
{
	Scanner sc=new Scanner(System.in);
  int k=sc.nextInt();
  String s=sc.next();
  
  if(s.length()<=k)
    System.out.println(s);
  
  else
  {
		s=s.substring(0,k) +"...";
      System.out.print(s);
    
  }
  
 
}
} Main
import 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();
  
  if(s.length()<=k)
    System.out.println(s);
  
  else
  {
		s=s.substring(0,k) +"...";
      System.out.print(s);
    
  }
  
 
}
}
