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