import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int k = scan.nextInt();
		String s = scan.next();
		if(s.length() > k){
			s = s.substring(0, k) + "...";
		}
		System.out.println(s);
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int k = scan.nextInt();
		String s = scan.next();
		if(s.length() > k){
			s = s.substring(0, k) + "...";
		}
		System.out.println(s);
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int k = scan.nextInt();
		String s = scan.next();
		if(s.length() > k){
			s = s.substring(0, k) + "...";
		}
		System.out.println(s);
	} main {
		Scanner scan = new Scanner(System.in);
		int k = scan.nextInt();
		String s = scan.next();
		if(s.length() > k){
			s = s.substring(0, k) + "...";
		}
		System.out.println(s);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan 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 public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int k = scan.nextInt();
		String s = scan.next();
		if(s.length() > k){
			s = s.substring(0, k) + "...";
		}
		System.out.println(s);
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int k = scan.nextInt();
		String s = scan.next();
		if(s.length() > k){
			s = s.substring(0, k) + "...";
		}
		System.out.println(s);
	}
} Main
import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int k = scan.nextInt();
		String s = scan.next();
		if(s.length() > k){
			s = s.substring(0, k) + "...";
		}
		System.out.println(s);
	}
}
