import java.util.Scanner;
import java.util.ArrayList;
 
public class Main {
  final static int max = 100;
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int K;
      String S;
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      K = Integer.parseInt(list.get(0));
      S = list.get(1);
//      System.out.println(K+S);
      check(K,S);
        scan.close();
    }
  
  public static void check(int k, String s){
    String cutS;
   if(k > max){
      System.err.println("文字が長すぎます。");
   } else if(k >= s.length()){
     System.out.println(s);
     return;
   } else{
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   }
    
  }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
  final static int max = 100;
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int K;
      String S;
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      K = Integer.parseInt(list.get(0));
      S = list.get(1);
//      System.out.println(K+S);
      check(K,S);
        scan.close();
    }
  
  public static void check(int k, String s){
    String cutS;
   if(k > max){
      System.err.println("文字が長すぎます。");
   } else if(k >= s.length()){
     System.out.println(s);
     return;
   } else{
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   }
    
  }
} Main final static int max = 100; max 100 public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int K;
      String S;
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      K = Integer.parseInt(list.get(0));
      S = list.get(1);
//      System.out.println(K+S);
      check(K,S);
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int K;
      String S;
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      K = Integer.parseInt(list.get(0));
      S = list.get(1);
//      System.out.println(K+S);
      check(K,S);
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() int K; K String S; S while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      } scan.hasNextLine() scan.hasNextLine scan {
      String an = scan.nextLine();
      list.add(an);
      } String an = scan.nextLine(); an scan.nextLine() scan.nextLine scan list.add(an) list.add list an K = Integer.parseInt(list.get(0)) K Integer.parseInt(list.get(0)) Integer.parseInt Integer list.get(0) list.get list 0 S = list.get(1) S list.get(1) list.get list 1 check(K,S) check K S scan.close() scan.close scan String[] args args public static void check(int k, String s){
    String cutS;
   if(k > max){
      System.err.println("文字が長すぎます。");
   } else if(k >= s.length()){
     System.out.println(s);
     return;
   } else{
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   }
    
  } check {
    String cutS;
   if(k > max){
      System.err.println("文字が長すぎます。");
   } else if(k >= s.length()){
     System.out.println(s);
     return;
   } else{
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   }
    
  } String cutS; cutS if(k > max){
      System.err.println("文字が長すぎます。");
   } else if(k >= s.length()){
     System.out.println(s);
     return;
   } else{
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   } k > max k max {
      System.err.println("文字が長すぎます。");
   } System.err.println("文字が長すぎます。") System.err.println System.err System System.err "文字が長すぎます。" if(k >= s.length()){
     System.out.println(s);
     return;
   } else{
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   } k >= s.length() k s.length() s.length s {
     System.out.println(s);
     return;
   } System.out.println(s) System.out.println System.out System System.out s return; {
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   } cutS = s.substring(0,k) cutS s.substring(0,k) s.substring s 0 k System.out.println(cutS+"...") System.out.println System.out System System.out cutS+"..." cutS "..." return; int k k String s s public class Main {
  final static int max = 100;
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int K;
      String S;
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      K = Integer.parseInt(list.get(0));
      S = list.get(1);
//      System.out.println(K+S);
      check(K,S);
        scan.close();
    }
  
  public static void check(int k, String s){
    String cutS;
   if(k > max){
      System.err.println("文字が長すぎます。");
   } else if(k >= s.length()){
     System.out.println(s);
     return;
   } else{
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   }
    
  }
} public class Main {
  final static int max = 100;
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int K;
      String S;
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      K = Integer.parseInt(list.get(0));
      S = list.get(1);
//      System.out.println(K+S);
      check(K,S);
        scan.close();
    }
  
  public static void check(int k, String s){
    String cutS;
   if(k > max){
      System.err.println("文字が長すぎます。");
   } else if(k >= s.length()){
     System.out.println(s);
     return;
   } else{
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   }
    
  }
} Main
import java.util.Scanner;
import java.util.ArrayList;
 
public class Main {
  final static int max = 100;
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int K;
      String S;
       while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      K = Integer.parseInt(list.get(0));
      S = list.get(1);
//      System.out.println(K+S);
      check(K,S);
        scan.close();
    }
  
  public static void check(int k, String s){
    String cutS;
   if(k > max){
      System.err.println("文字が長すぎます。");
   } else if(k >= s.length()){
     System.out.println(s);
     return;
   } else{
     cutS = s.substring(0,k);
     System.out.println(cutS+"...");
     return;
   }
    
  }
}