import java.awt.List;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Scanner;

public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext())
		{
			int a = sc.nextInt();
			String b = sc.next();
			if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			}
		}

	}

} import java.awt.List; List java.awt import java.math.BigInteger; BigInteger java.math import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collection; Collection java.util import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext())
		{
			int a = sc.nextInt();
			String b = sc.next();
			if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			}
		}

	}

} Main public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext())
		{
			int a = sc.nextInt();
			String b = sc.next();
			if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			}
		}

	} main {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext())
		{
			int a = sc.nextInt();
			String b = sc.next();
			if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			}
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext())
		{
			int a = sc.nextInt();
			String b = sc.next();
			if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			}
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			String b = sc.next();
			if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			}
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc String b = sc.next(); b sc.next() sc.next sc if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			} a < b.length() a b.length() b.length b {
				System.out.println(b.substring(0,a)+"...");
				
			} System.out.println(b.substring(0,a)+"...") System.out.println System.out System System.out b.substring(0,a)+"..." b.substring(0,a) b.substring b 0 a "..." {
				System.out.println(b);

			} System.out.println(b) System.out.println System.out System System.out b String args[] args public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext())
		{
			int a = sc.nextInt();
			String b = sc.next();
			if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			}
		}

	}

} public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext())
		{
			int a = sc.nextInt();
			String b = sc.next();
			if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			}
		}

	}

} Main
import java.awt.List;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Scanner;

public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext())
		{
			int a = sc.nextInt();
			String b = sc.next();
			if (a < b.length())
			{
				System.out.println(b.substring(0,a)+"...");
				
			} else
			{
				System.out.println(b);

			}
		}

	}

}