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