/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{ 
   static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);
    static StringTokenizer st;
    
    static String next()
        {
            while(st==null || !st.hasMoreElements()) 
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
   static int gcd(int a,int b)
     {
       if(b==0)
        return a;
       else
        return gcd(b,a%b);
     }
  public static void main (String[] args) throws java.lang.Exception
   {
	try{
	   
		  int k=Integer.parseInt(next());
		  String s=next();
		  String td="...";
		  int len=s.length();
		  if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td);
		 
	   }     
	catch(Exception e)
		 {}
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main
{ 
   static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);
    static StringTokenizer st;
    
    static String next()
        {
            while(st==null || !st.hasMoreElements()) 
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
   static int gcd(int a,int b)
     {
       if(b==0)
        return a;
       else
        return gcd(b,a%b);
     }
  public static void main (String[] args) throws java.lang.Exception
   {
	try{
	   
		  int k=Integer.parseInt(next());
		  String s=next();
		  String td="...";
		  int len=s.length();
		  if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td);
		 
	   }     
	catch(Exception e)
		 {}
	}
} Main static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) static PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) static StringTokenizer st; st static String next()
        {
            while(st==null || !st.hasMoreElements()) 
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while(st==null || !st.hasMoreElements()) 
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while(st==null || !st.hasMoreElements()) 
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
            } st==null || !st.hasMoreElements() st==null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
            } try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                } catch(IOException e)
                {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st static int gcd(int a,int b)
     {
       if(b==0)
        return a;
       else
        return gcd(b,a%b);
     } gcd {
       if(b==0)
        return a;
       else
        return gcd(b,a%b);
     } if(b==0)
        return a;
       else
        return gcd(b,a%b); b==0 b 0 return a; a return gcd(b,a%b); gcd(b,a%b) gcd b a%b a b int a a int b b public static void main (String[] args) throws java.lang.Exception
   {
	try{
	   
		  int k=Integer.parseInt(next());
		  String s=next();
		  String td="...";
		  int len=s.length();
		  if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td);
		 
	   }     
	catch(Exception e)
		 {}
	} main {
	try{
	   
		  int k=Integer.parseInt(next());
		  String s=next();
		  String td="...";
		  int len=s.length();
		  if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td);
		 
	   }     
	catch(Exception e)
		 {}
	} try{
	   
		  int k=Integer.parseInt(next());
		  String s=next();
		  String td="...";
		  int len=s.length();
		  if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td);
		 
	   }     
	catch(Exception e)
		 {} catch(Exception e)
		 {} Exception e {} {
	   
		  int k=Integer.parseInt(next());
		  String s=next();
		  String td="...";
		  int len=s.length();
		  if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td);
		 
	   } int k=Integer.parseInt(next()); k Integer.parseInt(next()) Integer.parseInt Integer next() next String s=next(); s next() next String td="..."; td "..." int len=s.length(); len s.length() s.length s if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td); k>=len k len System.out.println(s) System.out.println System.out System System.out s System.out.println(s.substring(0,k)+td) System.out.println System.out System System.out s.substring(0,k)+td s.substring(0,k) s.substring s 0 k td String[] args args public class Main
{ 
   static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);
    static StringTokenizer st;
    
    static String next()
        {
            while(st==null || !st.hasMoreElements()) 
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
   static int gcd(int a,int b)
     {
       if(b==0)
        return a;
       else
        return gcd(b,a%b);
     }
  public static void main (String[] args) throws java.lang.Exception
   {
	try{
	   
		  int k=Integer.parseInt(next());
		  String s=next();
		  String td="...";
		  int len=s.length();
		  if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td);
		 
	   }     
	catch(Exception e)
		 {}
	}
} public class Main
{ 
   static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);
    static StringTokenizer st;
    
    static String next()
        {
            while(st==null || !st.hasMoreElements()) 
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
   static int gcd(int a,int b)
     {
       if(b==0)
        return a;
       else
        return gcd(b,a%b);
     }
  public static void main (String[] args) throws java.lang.Exception
   {
	try{
	   
		  int k=Integer.parseInt(next());
		  String s=next();
		  String td="...";
		  int len=s.length();
		  if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td);
		 
	   }     
	catch(Exception e)
		 {}
	}
} Main
/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{ 
   static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);
    static StringTokenizer st;
    
    static String next()
        {
            while(st==null || !st.hasMoreElements()) 
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
   static int gcd(int a,int b)
     {
       if(b==0)
        return a;
       else
        return gcd(b,a%b);
     }
  public static void main (String[] args) throws java.lang.Exception
   {
	try{
	   
		  int k=Integer.parseInt(next());
		  String s=next();
		  String td="...";
		  int len=s.length();
		  if(k>=len)
		    System.out.println(s);
		 else
		   System.out.println(s.substring(0,k)+td);
		 
	   }     
	catch(Exception e)
		 {}
	}
}
