import java.util.Scanner;

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

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    byte k = sc.nextByte();
    sc.nextLine();
    String s = sc.nextLine();
    sc.close();
    if(s.length() > k) {
      s = s.substring(0, k) + "...";
    }
    System.out.println(s);
  }
}