import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner input = new Scanner(System.in)){
			int number = Integer.parseInt(input.nextLine());
			String str = input.nextLine();
			solution(number, str);
		}
	}
	public static void solution(int number, String str){
		if (str.length() <= number){
			System.out.println(str);
		}
		else{
			String ans = "";
			for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			}
			ans+="...";
			System.out.println(ans);
		}
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		try(Scanner input = new Scanner(System.in)){
			int number = Integer.parseInt(input.nextLine());
			String str = input.nextLine();
			solution(number, str);
		}
	}
	public static void solution(int number, String str){
		if (str.length() <= number){
			System.out.println(str);
		}
		else{
			String ans = "";
			for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			}
			ans+="...";
			System.out.println(ans);
		}
		
	}
} Main public static void main(String[] args){
		try(Scanner input = new Scanner(System.in)){
			int number = Integer.parseInt(input.nextLine());
			String str = input.nextLine();
			solution(number, str);
		}
	} main {
		try(Scanner input = new Scanner(System.in)){
			int number = Integer.parseInt(input.nextLine());
			String str = input.nextLine();
			solution(number, str);
		}
	} try(Scanner input = new Scanner(System.in)){
			int number = Integer.parseInt(input.nextLine());
			String str = input.nextLine();
			solution(number, str);
		} {
			int number = Integer.parseInt(input.nextLine());
			String str = input.nextLine();
			solution(number, str);
		} Scanner input = new Scanner(System.in) Scanner input = new Scanner(System.in) new Scanner(System.in) int number = Integer.parseInt(input.nextLine()); number Integer.parseInt(input.nextLine()) Integer.parseInt Integer input.nextLine() input.nextLine input String str = input.nextLine(); str input.nextLine() input.nextLine input solution(number, str) solution number str String[] args args public static void solution(int number, String str){
		if (str.length() <= number){
			System.out.println(str);
		}
		else{
			String ans = "";
			for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			}
			ans+="...";
			System.out.println(ans);
		}
		
	} solution {
		if (str.length() <= number){
			System.out.println(str);
		}
		else{
			String ans = "";
			for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			}
			ans+="...";
			System.out.println(ans);
		}
		
	} if (str.length() <= number){
			System.out.println(str);
		}
		else{
			String ans = "";
			for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			}
			ans+="...";
			System.out.println(ans);
		} str.length() <= number str.length() str.length str number {
			System.out.println(str);
		} System.out.println(str) System.out.println System.out System System.out str {
			String ans = "";
			for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			}
			ans+="...";
			System.out.println(ans);
		} String ans = ""; ans "" for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			} int i =0; int i =0; i 0 i <number i number i++ i++ i {
				ans+=str.charAt(i);
			} {
				ans+=str.charAt(i);
			} ans+=str.charAt(i) ans str.charAt(i) str.charAt str i ans+="..." ans "..." System.out.println(ans) System.out.println System.out System System.out ans int number number String str str public class Main {
	public static void main(String[] args){
		try(Scanner input = new Scanner(System.in)){
			int number = Integer.parseInt(input.nextLine());
			String str = input.nextLine();
			solution(number, str);
		}
	}
	public static void solution(int number, String str){
		if (str.length() <= number){
			System.out.println(str);
		}
		else{
			String ans = "";
			for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			}
			ans+="...";
			System.out.println(ans);
		}
		
	}
} public class Main {
	public static void main(String[] args){
		try(Scanner input = new Scanner(System.in)){
			int number = Integer.parseInt(input.nextLine());
			String str = input.nextLine();
			solution(number, str);
		}
	}
	public static void solution(int number, String str){
		if (str.length() <= number){
			System.out.println(str);
		}
		else{
			String ans = "";
			for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			}
			ans+="...";
			System.out.println(ans);
		}
		
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner input = new Scanner(System.in)){
			int number = Integer.parseInt(input.nextLine());
			String str = input.nextLine();
			solution(number, str);
		}
	}
	public static void solution(int number, String str){
		if (str.length() <= number){
			System.out.println(str);
		}
		else{
			String ans = "";
			for (int i =0; i <number;i++){
				ans+=str.charAt(i);
			}
			ans+="...";
			System.out.println(ans);
		}
		
	}
}
