import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num =sc.nextInt();
		String str =sc.next();
		
		if(str.length()>num)
			System.out.println(str.substring(0, num)+"...");
		else
			System.out.println(str);

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num =sc.nextInt();
		String str =sc.next();
		
		if(str.length()>num)
			System.out.println(str.substring(0, num)+"...");
		else
			System.out.println(str);

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num =sc.nextInt();
		String str =sc.next();
		
		if(str.length()>num)
			System.out.println(str.substring(0, num)+"...");
		else
			System.out.println(str);

	} main {
		Scanner sc = new Scanner(System.in);
		int num =sc.nextInt();
		String str =sc.next();
		
		if(str.length()>num)
			System.out.println(str.substring(0, num)+"...");
		else
			System.out.println(str);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num =sc.nextInt(); num sc.nextInt() sc.nextInt sc String str =sc.next(); str sc.next() sc.next sc if(str.length()>num)
			System.out.println(str.substring(0, num)+"...");
		else
			System.out.println(str); str.length()>num str.length() str.length str num System.out.println(str.substring(0, num)+"...") System.out.println System.out System System.out str.substring(0, num)+"..." str.substring(0, num) str.substring str 0 num "..." System.out.println(str) System.out.println System.out System System.out str String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num =sc.nextInt();
		String str =sc.next();
		
		if(str.length()>num)
			System.out.println(str.substring(0, num)+"...");
		else
			System.out.println(str);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num =sc.nextInt();
		String str =sc.next();
		
		if(str.length()>num)
			System.out.println(str.substring(0, num)+"...");
		else
			System.out.println(str);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num =sc.nextInt();
		String str =sc.next();
		
		if(str.length()>num)
			System.out.println(str.substring(0, num)+"...");
		else
			System.out.println(str);

	}

}