import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int K = sc.nextInt();
		sc.nextLine();
		String str = sc.nextLine();


		if(str.length() <= K) {
			System.out.println(str);
			return;
		}

		String str2 = str.substring(0,K) + "...";

		System.out.println(str2);

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int K = sc.nextInt();
		sc.nextLine();
		String str = sc.nextLine();


		if(str.length() <= K) {
			System.out.println(str);
			return;
		}

		String str2 = str.substring(0,K) + "...";

		System.out.println(str2);

	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int K = sc.nextInt();
		sc.nextLine();
		String str = sc.nextLine();


		if(str.length() <= K) {
			System.out.println(str);
			return;
		}

		String str2 = str.substring(0,K) + "...";

		System.out.println(str2);

	} main {

		Scanner sc = new Scanner(System.in);

		int K = sc.nextInt();
		sc.nextLine();
		String str = sc.nextLine();


		if(str.length() <= K) {
			System.out.println(str);
			return;
		}

		String str2 = str.substring(0,K) + "...";

		System.out.println(str2);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc if(str.length() <= K) {
			System.out.println(str);
			return;
		} str.length() <= K str.length() str.length str K {
			System.out.println(str);
			return;
		} System.out.println(str) System.out.println System.out System System.out str return; String str2 = str.substring(0,K) + "..."; str2 str.substring(0,K) + "..." str.substring(0,K) str.substring str 0 K "..." System.out.println(str2) System.out.println System.out System System.out str2 String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int K = sc.nextInt();
		sc.nextLine();
		String str = sc.nextLine();


		if(str.length() <= K) {
			System.out.println(str);
			return;
		}

		String str2 = str.substring(0,K) + "...";

		System.out.println(str2);

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int K = sc.nextInt();
		sc.nextLine();
		String str = sc.nextLine();


		if(str.length() <= K) {
			System.out.println(str);
			return;
		}

		String str2 = str.substring(0,K) + "...";

		System.out.println(str2);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int K = sc.nextInt();
		sc.nextLine();
		String str = sc.nextLine();


		if(str.length() <= K) {
			System.out.println(str);
			return;
		}

		String str2 = str.substring(0,K) + "...";

		System.out.println(str2);

	}

}