import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);

        int T;
        T=1;
        while((T--)>0)
        {
            //code comes here
            int K=in.nextInt();
            in.nextLine();
            String str=in.nextLine();
            if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            }

        }   
        in.close();
    }

} import java.util.*; util.* java import java.io.*; io.* java public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);

        int T;
        T=1;
        while((T--)>0)
        {
            //code comes here
            int K=in.nextInt();
            in.nextLine();
            String str=in.nextLine();
            if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            }

        }   
        in.close();
    }

} Main public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);

        int T;
        T=1;
        while((T--)>0)
        {
            //code comes here
            int K=in.nextInt();
            in.nextLine();
            String str=in.nextLine();
            if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            }

        }   
        in.close();
    } main {
        Scanner in = new Scanner(System.in);
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);

        int T;
        T=1;
        while((T--)>0)
        {
            //code comes here
            int K=in.nextInt();
            in.nextLine();
            String str=in.nextLine();
            if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            }

        }   
        in.close();
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) OutputStream outputStream = System.out; outputStream System.out System System.out PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) int T; T T=1 T 1 while((T--)>0)
        {
            //code comes here
            int K=in.nextInt();
            in.nextLine();
            String str=in.nextLine();
            if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            }

        } (T--)>0 (T--) T 0 {
            //code comes here
            int K=in.nextInt();
            in.nextLine();
            String str=in.nextLine();
            if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            }

        } int K=in.nextInt(); K in.nextInt() in.nextInt in in.nextLine() in.nextLine in String str=in.nextLine(); str in.nextLine() in.nextLine in if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            } str.length()<=K str.length() str.length str K {
                System.out.println(str);
            } System.out.println(str) System.out.println System.out System System.out str {
                System.out.println(str.substring(0, K)+"...");
            } System.out.println(str.substring(0, K)+"...") System.out.println System.out System System.out str.substring(0, K)+"..." str.substring(0, K) str.substring str 0 K "..." in.close() in.close in String[] args args public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);

        int T;
        T=1;
        while((T--)>0)
        {
            //code comes here
            int K=in.nextInt();
            in.nextLine();
            String str=in.nextLine();
            if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            }

        }   
        in.close();
    }

} public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);

        int T;
        T=1;
        while((T--)>0)
        {
            //code comes here
            int K=in.nextInt();
            in.nextLine();
            String str=in.nextLine();
            if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            }

        }   
        in.close();
    }

} Main
import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);

        int T;
        T=1;
        while((T--)>0)
        {
            //code comes here
            int K=in.nextInt();
            in.nextLine();
            String str=in.nextLine();
            if(str.length()<=K)
            {
                System.out.println(str);
            }
            else
            {
                System.out.println(str.substring(0, K)+"...");
            }

        }   
        in.close();
    }

}