import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		prob(System.in, System.out);
	}

	public static void prob(InputStream in, PrintStream out) {
		Scanner sc = new Scanner(in);
		int k = Integer.valueOf(sc.nextLine());
		String s = sc.nextLine();
		
		if (s.length() <= k) {
			out.println(s);
		} else {
			out.println(s.substring(0, k) + "...");
		}
	}
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		prob(System.in, System.out);
	}

	public static void prob(InputStream in, PrintStream out) {
		Scanner sc = new Scanner(in);
		int k = Integer.valueOf(sc.nextLine());
		String s = sc.nextLine();
		
		if (s.length() <= k) {
			out.println(s);
		} else {
			out.println(s.substring(0, k) + "...");
		}
	}
} Main public static void main(String[] args) {
		prob(System.in, System.out);
	} main {
		prob(System.in, System.out);
	} prob(System.in, System.out) prob System.in System System.in System.out System System.out String[] args args public static void prob(InputStream in, PrintStream out) {
		Scanner sc = new Scanner(in);
		int k = Integer.valueOf(sc.nextLine());
		String s = sc.nextLine();
		
		if (s.length() <= k) {
			out.println(s);
		} else {
			out.println(s.substring(0, k) + "...");
		}
	} prob {
		Scanner sc = new Scanner(in);
		int k = Integer.valueOf(sc.nextLine());
		String s = sc.nextLine();
		
		if (s.length() <= k) {
			out.println(s);
		} else {
			out.println(s.substring(0, k) + "...");
		}
	} Scanner sc = new Scanner(in); sc new Scanner(in) int k = Integer.valueOf(sc.nextLine()); k Integer.valueOf(sc.nextLine()) Integer.valueOf Integer sc.nextLine() sc.nextLine sc String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc if (s.length() <= k) {
			out.println(s);
		} else {
			out.println(s.substring(0, k) + "...");
		} s.length() <= k s.length() s.length s k {
			out.println(s);
		} out.println(s) out.println out s {
			out.println(s.substring(0, k) + "...");
		} out.println(s.substring(0, k) + "...") out.println out s.substring(0, k) + "..." s.substring(0, k) s.substring s 0 k "..." InputStream in in PrintStream out out public class Main {
	public static void main(String[] args) {
		prob(System.in, System.out);
	}

	public static void prob(InputStream in, PrintStream out) {
		Scanner sc = new Scanner(in);
		int k = Integer.valueOf(sc.nextLine());
		String s = sc.nextLine();
		
		if (s.length() <= k) {
			out.println(s);
		} else {
			out.println(s.substring(0, k) + "...");
		}
	}
} public class Main {
	public static void main(String[] args) {
		prob(System.in, System.out);
	}

	public static void prob(InputStream in, PrintStream out) {
		Scanner sc = new Scanner(in);
		int k = Integer.valueOf(sc.nextLine());
		String s = sc.nextLine();
		
		if (s.length() <= k) {
			out.println(s);
		} else {
			out.println(s.substring(0, k) + "...");
		}
	}
} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		prob(System.in, System.out);
	}

	public static void prob(InputStream in, PrintStream out) {
		Scanner sc = new Scanner(in);
		int k = Integer.valueOf(sc.nextLine());
		String s = sc.nextLine();
		
		if (s.length() <= k) {
			out.println(s);
		} else {
			out.println(s.substring(0, k) + "...");
		}
	}
}