import java.util.*;
import java.io.PrintWriter;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int k = parseInt(sc.next());
//		char[] s = sc.next().toCharArray();
		String s = sc.next();
		sc.close();
		String ans=s;
		if(s.length()>k) {
			ans=s.substring(0,k) + "...";
		}
		out.println(ans);
	}
} import java.util.*; util.* java import java.io.PrintWriter; PrintWriter java.io import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int k = parseInt(sc.next());
//		char[] s = sc.next().toCharArray();
		String s = sc.next();
		sc.close();
		String ans=s;
		if(s.length()>k) {
			ans=s.substring(0,k) + "...";
		}
		out.println(ans);
	}
} Main public static final int MOD = 1000000007; MOD 1000000007 public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int k = parseInt(sc.next());
//		char[] s = sc.next().toCharArray();
		String s = sc.next();
		sc.close();
		String ans=s;
		if(s.length()>k) {
			ans=s.substring(0,k) + "...";
		}
		out.println(ans);
	} main {
		int i,j;
		Scanner sc = new Scanner(in);
		int k = parseInt(sc.next());
//		char[] s = sc.next().toCharArray();
		String s = sc.next();
		sc.close();
		String ans=s;
		if(s.length()>k) {
			ans=s.substring(0,k) + "...";
		}
		out.println(ans);
	} int i i j; j Scanner sc = new Scanner(in); sc new Scanner(in) int k = parseInt(sc.next()); k parseInt(sc.next()) parseInt sc.next() sc.next sc String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc String ans=s; ans s if(s.length()>k) {
			ans=s.substring(0,k) + "...";
		} s.length()>k s.length() s.length s k {
			ans=s.substring(0,k) + "...";
		} ans=s.substring(0,k) + "..." ans s.substring(0,k) + "..." s.substring(0,k) s.substring s 0 k "..." out.println(ans) out.println out ans String[] args args public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int k = parseInt(sc.next());
//		char[] s = sc.next().toCharArray();
		String s = sc.next();
		sc.close();
		String ans=s;
		if(s.length()>k) {
			ans=s.substring(0,k) + "...";
		}
		out.println(ans);
	}
} public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int k = parseInt(sc.next());
//		char[] s = sc.next().toCharArray();
		String s = sc.next();
		sc.close();
		String ans=s;
		if(s.length()>k) {
			ans=s.substring(0,k) + "...";
		}
		out.println(ans);
	}
} Main
import java.util.*;
import java.io.PrintWriter;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int k = parseInt(sc.next());
//		char[] s = sc.next().toCharArray();
		String s = sc.next();
		sc.close();
		String ans=s;
		if(s.length()>k) {
			ans=s.substring(0,k) + "...";
		}
		out.println(ans);
	}
}
