import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String k = sc.nextLine();
    int kInt = Integer.parseInt(k);
    String s = sc.nextLine();
    if (s.length() > kInt) {
      s = s.substring(0, kInt);
      s += "...";
    }
    System.out.println(s);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String k = sc.nextLine();
    int kInt = Integer.parseInt(k);
    String s = sc.nextLine();
    if (s.length() > kInt) {
      s = s.substring(0, kInt);
      s += "...";
    }
    System.out.println(s);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String k = sc.nextLine();
    int kInt = Integer.parseInt(k);
    String s = sc.nextLine();
    if (s.length() > kInt) {
      s = s.substring(0, kInt);
      s += "...";
    }
    System.out.println(s);
  } main {
    Scanner sc = new Scanner(System.in);
    String k = sc.nextLine();
    int kInt = Integer.parseInt(k);
    String s = sc.nextLine();
    if (s.length() > kInt) {
      s = s.substring(0, kInt);
      s += "...";
    }
    System.out.println(s);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String k = sc.nextLine(); k sc.nextLine() sc.nextLine sc int kInt = Integer.parseInt(k); kInt Integer.parseInt(k) Integer.parseInt Integer k String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc if (s.length() > kInt) {
      s = s.substring(0, kInt);
      s += "...";
    } s.length() > kInt s.length() s.length s kInt {
      s = s.substring(0, kInt);
      s += "...";
    } s = s.substring(0, kInt) s s.substring(0, kInt) s.substring s 0 kInt s += "..." s "..." System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String k = sc.nextLine();
    int kInt = Integer.parseInt(k);
    String s = sc.nextLine();
    if (s.length() > kInt) {
      s = s.substring(0, kInt);
      s += "...";
    }
    System.out.println(s);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String k = sc.nextLine();
    int kInt = Integer.parseInt(k);
    String s = sc.nextLine();
    if (s.length() > kInt) {
      s = s.substring(0, kInt);
      s += "...";
    }
    System.out.println(s);
  }
} Main
import java.util.Scanner;

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