import java.util.*;
import java.io.*;
public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	int K = Integer.parseInt(reader.readLine());
	String S = reader.readLine();
	int len = S.length();
	if(len<=K){
	System.out.println(S);
	}
	else{
		String h = "";
		for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		}
		h+="...";
		System.out.println(h);
	}
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	int K = Integer.parseInt(reader.readLine());
	String S = reader.readLine();
	int len = S.length();
	if(len<=K){
	System.out.println(S);
	}
	else{
		String h = "";
		for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		}
		h+="...";
		System.out.println(h);
	}
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	int K = Integer.parseInt(reader.readLine());
	String S = reader.readLine();
	int len = S.length();
	if(len<=K){
	System.out.println(S);
	}
	else{
		String h = "";
		for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		}
		h+="...";
		System.out.println(h);
	}
	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	int K = Integer.parseInt(reader.readLine());
	String S = reader.readLine();
	int len = S.length();
	if(len<=K){
	System.out.println(S);
	}
	else{
		String h = "";
		for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		}
		h+="...";
		System.out.println(h);
	}
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) int K = Integer.parseInt(reader.readLine()); K Integer.parseInt(reader.readLine()) Integer.parseInt Integer reader.readLine() reader.readLine reader String S = reader.readLine(); S reader.readLine() reader.readLine reader int len = S.length(); len S.length() S.length S if(len<=K){
	System.out.println(S);
	}
	else{
		String h = "";
		for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		}
		h+="...";
		System.out.println(h);
	} len<=K len K {
	System.out.println(S);
	} System.out.println(S) System.out.println System.out System System.out S {
		String h = "";
		for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		}
		h+="...";
		System.out.println(h);
	} String h = ""; h "" for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		} int i = 0; int i = 0; i 0 i<K i K i++ i++ i {
			h+=S.charAt(i);
		} {
			h+=S.charAt(i);
		} h+=S.charAt(i) h S.charAt(i) S.charAt S i h+="..." h "..." System.out.println(h) System.out.println System.out System System.out h String[] args args public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	int K = Integer.parseInt(reader.readLine());
	String S = reader.readLine();
	int len = S.length();
	if(len<=K){
	System.out.println(S);
	}
	else{
		String h = "";
		for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		}
		h+="...";
		System.out.println(h);
	}
	}
} public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	int K = Integer.parseInt(reader.readLine());
	String S = reader.readLine();
	int len = S.length();
	if(len<=K){
	System.out.println(S);
	}
	else{
		String h = "";
		for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		}
		h+="...";
		System.out.println(h);
	}
	}
} Main
import java.util.*;
import java.io.*;
public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	int K = Integer.parseInt(reader.readLine());
	String S = reader.readLine();
	int len = S.length();
	if(len<=K){
	System.out.println(S);
	}
	else{
		String h = "";
		for(int i = 0;i<K;i++){
			h+=S.charAt(i);
		}
		h+="...";
		System.out.println(h);
	}
	}
}
