import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int kazu=sc.nextInt();
       String moji = sc.nextLine();
	   moji = sc.nextLine();
      if(moji.length()<=kazu){
        System.out.println(moji);
      }else{
        System.out.println(moji.substring(0,kazu)+"...");
      }
}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int kazu=sc.nextInt();
       String moji = sc.nextLine();
	   moji = sc.nextLine();
      if(moji.length()<=kazu){
        System.out.println(moji);
      }else{
        System.out.println(moji.substring(0,kazu)+"...");
      }
}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int kazu=sc.nextInt();
       String moji = sc.nextLine();
	   moji = sc.nextLine();
      if(moji.length()<=kazu){
        System.out.println(moji);
      }else{
        System.out.println(moji.substring(0,kazu)+"...");
      }
} main {
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int kazu=sc.nextInt();
       String moji = sc.nextLine();
	   moji = sc.nextLine();
      if(moji.length()<=kazu){
        System.out.println(moji);
      }else{
        System.out.println(moji.substring(0,kazu)+"...");
      }
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int kazu=sc.nextInt(); kazu sc.nextInt() sc.nextInt sc String moji = sc.nextLine(); moji sc.nextLine() sc.nextLine sc moji = sc.nextLine() moji sc.nextLine() sc.nextLine sc if(moji.length()<=kazu){
        System.out.println(moji);
      }else{
        System.out.println(moji.substring(0,kazu)+"...");
      } moji.length()<=kazu moji.length() moji.length moji kazu {
        System.out.println(moji);
      } System.out.println(moji) System.out.println System.out System System.out moji {
        System.out.println(moji.substring(0,kazu)+"...");
      } System.out.println(moji.substring(0,kazu)+"...") System.out.println System.out System System.out moji.substring(0,kazu)+"..." moji.substring(0,kazu) moji.substring moji 0 kazu "..." String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int kazu=sc.nextInt();
       String moji = sc.nextLine();
	   moji = sc.nextLine();
      if(moji.length()<=kazu){
        System.out.println(moji);
      }else{
        System.out.println(moji.substring(0,kazu)+"...");
      }
}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int kazu=sc.nextInt();
       String moji = sc.nextLine();
	   moji = sc.nextLine();
      if(moji.length()<=kazu){
        System.out.println(moji);
      }else{
        System.out.println(moji.substring(0,kazu)+"...");
      }
}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int kazu=sc.nextInt();
       String moji = sc.nextLine();
	   moji = sc.nextLine();
      if(moji.length()<=kazu){
        System.out.println(moji);
      }else{
        System.out.println(moji.substring(0,kazu)+"...");
      }
}
}
