import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String t = sc.nextLine();
        int l = t.length();
        int k;
        if(l == 1){
            k = t.charAt(0) - '0';
        }else if(l == 3){
            k = 100;
        }else{
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        }
        String s = sc.nextLine();
        int n = s.length();
        if(n <= k){
            System.out.println(s);
        }else{
            System.out.println(s.substring(0,k) + "...");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String t = sc.nextLine();
        int l = t.length();
        int k;
        if(l == 1){
            k = t.charAt(0) - '0';
        }else if(l == 3){
            k = 100;
        }else{
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        }
        String s = sc.nextLine();
        int n = s.length();
        if(n <= k){
            System.out.println(s);
        }else{
            System.out.println(s.substring(0,k) + "...");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String t = sc.nextLine();
        int l = t.length();
        int k;
        if(l == 1){
            k = t.charAt(0) - '0';
        }else if(l == 3){
            k = 100;
        }else{
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        }
        String s = sc.nextLine();
        int n = s.length();
        if(n <= k){
            System.out.println(s);
        }else{
            System.out.println(s.substring(0,k) + "...");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String t = sc.nextLine();
        int l = t.length();
        int k;
        if(l == 1){
            k = t.charAt(0) - '0';
        }else if(l == 3){
            k = 100;
        }else{
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        }
        String s = sc.nextLine();
        int n = s.length();
        if(n <= k){
            System.out.println(s);
        }else{
            System.out.println(s.substring(0,k) + "...");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String t = sc.nextLine(); t sc.nextLine() sc.nextLine sc int l = t.length(); l t.length() t.length t int k; k if(l == 1){
            k = t.charAt(0) - '0';
        }else if(l == 3){
            k = 100;
        }else{
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        } l == 1 l 1 {
            k = t.charAt(0) - '0';
        } k = t.charAt(0) - '0' k t.charAt(0) - '0' t.charAt(0) t.charAt t 0 '0' if(l == 3){
            k = 100;
        }else{
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        } l == 3 l 3 {
            k = 100;
        } k = 100 k 100 {
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        } k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0' k (t.charAt(0) - '0') * 10 + t.charAt(1) - '0' (t.charAt(0) - '0') * 10 + t.charAt(1) (t.charAt(0) - '0') * 10 (t.charAt(0) - '0') t.charAt(0) t.charAt t 0 '0' 10 t.charAt(1) t.charAt t 1 '0' String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int n = s.length(); n s.length() s.length s if(n <= k){
            System.out.println(s);
        }else{
            System.out.println(s.substring(0,k) + "...");
        } n <= k n k {
            System.out.println(s);
        } System.out.println(s) System.out.println System.out System System.out s {
            System.out.println(s.substring(0,k) + "...");
        } System.out.println(s.substring(0,k) + "...") System.out.println System.out System System.out s.substring(0,k) + "..." s.substring(0,k) s.substring s 0 k "..." String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String t = sc.nextLine();
        int l = t.length();
        int k;
        if(l == 1){
            k = t.charAt(0) - '0';
        }else if(l == 3){
            k = 100;
        }else{
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        }
        String s = sc.nextLine();
        int n = s.length();
        if(n <= k){
            System.out.println(s);
        }else{
            System.out.println(s.substring(0,k) + "...");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String t = sc.nextLine();
        int l = t.length();
        int k;
        if(l == 1){
            k = t.charAt(0) - '0';
        }else if(l == 3){
            k = 100;
        }else{
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        }
        String s = sc.nextLine();
        int n = s.length();
        if(n <= k){
            System.out.println(s);
        }else{
            System.out.println(s.substring(0,k) + "...");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String t = sc.nextLine();
        int l = t.length();
        int k;
        if(l == 1){
            k = t.charAt(0) - '0';
        }else if(l == 3){
            k = 100;
        }else{
            k = (t.charAt(0) - '0') * 10 + t.charAt(1) - '0';
        }
        String s = sc.nextLine();
        int n = s.length();
        if(n <= k){
            System.out.println(s);
        }else{
            System.out.println(s.substring(0,k) + "...");
        }
    }
}