import java.util.*;
import java.math.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
 
            int k = Integer.parseInt(sc.next());
            String s = sc.next();

            String ans = "";

            if(s.length() <= k){
                ans = s;
            }else{
                ans = s.substring(0, k) + "...";
            }

            System.out.println(ans);

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
} import java.util.*; util.* java import java.math.*; math.* java class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
 
            int k = Integer.parseInt(sc.next());
            String s = sc.next();

            String ans = "";

            if(s.length() <= k){
                ans = s;
            }else{
                ans = s.substring(0, k) + "...";
            }

            System.out.println(ans);

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
} Main public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
 
            int k = Integer.parseInt(sc.next());
            String s = sc.next();

            String ans = "";

            if(s.length() <= k){
                ans = s;
            }else{
                ans = s.substring(0, k) + "...";
            }

            System.out.println(ans);

        }catch(Exception e){
            e.printStackTrace();
        }        
    } main {
        
        try(Scanner sc = new Scanner(System.in)){
 
            int k = Integer.parseInt(sc.next());
            String s = sc.next();

            String ans = "";

            if(s.length() <= k){
                ans = s;
            }else{
                ans = s.substring(0, k) + "...";
            }

            System.out.println(ans);

        }catch(Exception e){
            e.printStackTrace();
        }        
    } try(Scanner sc = new Scanner(System.in)){
 
            int k = Integer.parseInt(sc.next());
            String s = sc.next();

            String ans = "";

            if(s.length() <= k){
                ans = s;
            }else{
                ans = s.substring(0, k) + "...";
            }

            System.out.println(ans);

        }catch(Exception e){
            e.printStackTrace();
        } catch(Exception e){
            e.printStackTrace();
        } Exception e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
 
            int k = Integer.parseInt(sc.next());
            String s = sc.next();

            String ans = "";

            if(s.length() <= k){
                ans = s;
            }else{
                ans = s.substring(0, k) + "...";
            }

            System.out.println(ans);

        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int k = Integer.parseInt(sc.next()); k Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String s = sc.next(); s sc.next() sc.next sc String ans = ""; ans "" if(s.length() <= k){
                ans = s;
            }else{
                ans = s.substring(0, k) + "...";
            } s.length() <= k s.length() s.length s k {
                ans = s;
            } ans = s ans s {
                ans = s.substring(0, k) + "...";
            } ans = s.substring(0, k) + "..." ans s.substring(0, k) + "..." s.substring(0, k) s.substring s 0 k "..." System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
import java.math.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
 
            int k = Integer.parseInt(sc.next());
            String s = sc.next();

            String ans = "";

            if(s.length() <= k){
                ans = s;
            }else{
                ans = s.substring(0, k) + "...";
            }

            System.out.println(ans);

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
}