import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		int k = Integer.parseInt(br.readLine());
		String s = br.readLine();
		
		if(s.length() > k) {
			bw.write(s.substring(0, k) + "...\n");
		} else {
			bw.write(s + "\n");
		}
		
		bw.flush();
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.BufferedWriter; BufferedWriter java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		int k = Integer.parseInt(br.readLine());
		String s = br.readLine();
		
		if(s.length() > k) {
			bw.write(s.substring(0, k) + "...\n");
		} else {
			bw.write(s + "\n");
		}
		
		bw.flush();
	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		int k = Integer.parseInt(br.readLine());
		String s = br.readLine();
		
		if(s.length() > k) {
			bw.write(s.substring(0, k) + "...\n");
		} else {
			bw.write(s + "\n");
		}
		
		bw.flush();
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		int k = Integer.parseInt(br.readLine());
		String s = br.readLine();
		
		if(s.length() > k) {
			bw.write(s.substring(0, k) + "...\n");
		} else {
			bw.write(s + "\n");
		}
		
		bw.flush();
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); bw new BufferedWriter(new OutputStreamWriter(System.out)) int k = Integer.parseInt(br.readLine()); k Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String s = br.readLine(); s br.readLine() br.readLine br if(s.length() > k) {
			bw.write(s.substring(0, k) + "...\n");
		} else {
			bw.write(s + "\n");
		} s.length() > k s.length() s.length s k {
			bw.write(s.substring(0, k) + "...\n");
		} bw.write(s.substring(0, k) + "...\n") bw.write bw s.substring(0, k) + "...\n" s.substring(0, k) s.substring s 0 k "...\n" {
			bw.write(s + "\n");
		} bw.write(s + "\n") bw.write bw s + "\n" s "\n" bw.flush() bw.flush bw String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		int k = Integer.parseInt(br.readLine());
		String s = br.readLine();
		
		if(s.length() > k) {
			bw.write(s.substring(0, k) + "...\n");
		} else {
			bw.write(s + "\n");
		}
		
		bw.flush();
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		int k = Integer.parseInt(br.readLine());
		String s = br.readLine();
		
		if(s.length() > k) {
			bw.write(s.substring(0, k) + "...\n");
		} else {
			bw.write(s + "\n");
		}
		
		bw.flush();
	}

} Main
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		int k = Integer.parseInt(br.readLine());
		String s = br.readLine();
		
		if(s.length() > k) {
			bw.write(s.substring(0, k) + "...\n");
		} else {
			bw.write(s + "\n");
		}
		
		bw.flush();
	}

}
