import java.util.Arrays;
import java.util.Scanner;

public class Main
{
	public static void main ( String[] args )
	{
		Scanner sc = new Scanner ( System.in );
		String[] str = new String[ sc.nextInt () ];
		sc.nextInt ();

		for ( int i = 0; i < str.length; i++ )
		{
			str[ i ] = sc.next ();
		}

		new Main ().run ( str );
	}

	public void run ( String[] str )
	{
		Arrays.sort ( str , 0 , str.length );

		String result = "";

		for ( int i = 0; i < str.length; i++ )
		{
			result = result + str[ i ];
		}

		System.out.println ( result );
	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main
{
	public static void main ( String[] args )
	{
		Scanner sc = new Scanner ( System.in );
		String[] str = new String[ sc.nextInt () ];
		sc.nextInt ();

		for ( int i = 0; i < str.length; i++ )
		{
			str[ i ] = sc.next ();
		}

		new Main ().run ( str );
	}

	public void run ( String[] str )
	{
		Arrays.sort ( str , 0 , str.length );

		String result = "";

		for ( int i = 0; i < str.length; i++ )
		{
			result = result + str[ i ];
		}

		System.out.println ( result );
	}

} Main public static void main ( String[] args )
	{
		Scanner sc = new Scanner ( System.in );
		String[] str = new String[ sc.nextInt () ];
		sc.nextInt ();

		for ( int i = 0; i < str.length; i++ )
		{
			str[ i ] = sc.next ();
		}

		new Main ().run ( str );
	} main {
		Scanner sc = new Scanner ( System.in );
		String[] str = new String[ sc.nextInt () ];
		sc.nextInt ();

		for ( int i = 0; i < str.length; i++ )
		{
			str[ i ] = sc.next ();
		}

		new Main ().run ( str );
	} Scanner sc = new Scanner ( System.in ); sc new Scanner ( System.in ) String[] str = new String[ sc.nextInt () ]; str new String[ sc.nextInt () ] sc.nextInt () sc.nextInt sc sc.nextInt () sc.nextInt sc for ( int i = 0; i < str.length; i++ )
		{
			str[ i ] = sc.next ();
		} int i = 0; int i = 0; i 0 i < str.length i str.length str str.length i++ i++ i {
			str[ i ] = sc.next ();
		} {
			str[ i ] = sc.next ();
		} str[ i ] = sc.next () str[ i ] str i sc.next () sc.next sc new Main ().run ( str ) new Main ().run new Main () str String[] args args public void run ( String[] str )
	{
		Arrays.sort ( str , 0 , str.length );

		String result = "";

		for ( int i = 0; i < str.length; i++ )
		{
			result = result + str[ i ];
		}

		System.out.println ( result );
	} run {
		Arrays.sort ( str , 0 , str.length );

		String result = "";

		for ( int i = 0; i < str.length; i++ )
		{
			result = result + str[ i ];
		}

		System.out.println ( result );
	} Arrays.sort ( str , 0 , str.length ) Arrays.sort Arrays str 0 str.length str str.length String result = ""; result "" for ( int i = 0; i < str.length; i++ )
		{
			result = result + str[ i ];
		} int i = 0; int i = 0; i 0 i < str.length i str.length str str.length i++ i++ i {
			result = result + str[ i ];
		} {
			result = result + str[ i ];
		} result = result + str[ i ] result result + str[ i ] result str[ i ] str i System.out.println ( result ) System.out.println System.out System System.out result String[] str str public class Main
{
	public static void main ( String[] args )
	{
		Scanner sc = new Scanner ( System.in );
		String[] str = new String[ sc.nextInt () ];
		sc.nextInt ();

		for ( int i = 0; i < str.length; i++ )
		{
			str[ i ] = sc.next ();
		}

		new Main ().run ( str );
	}

	public void run ( String[] str )
	{
		Arrays.sort ( str , 0 , str.length );

		String result = "";

		for ( int i = 0; i < str.length; i++ )
		{
			result = result + str[ i ];
		}

		System.out.println ( result );
	}

} public class Main
{
	public static void main ( String[] args )
	{
		Scanner sc = new Scanner ( System.in );
		String[] str = new String[ sc.nextInt () ];
		sc.nextInt ();

		for ( int i = 0; i < str.length; i++ )
		{
			str[ i ] = sc.next ();
		}

		new Main ().run ( str );
	}

	public void run ( String[] str )
	{
		Arrays.sort ( str , 0 , str.length );

		String result = "";

		for ( int i = 0; i < str.length; i++ )
		{
			result = result + str[ i ];
		}

		System.out.println ( result );
	}

} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main
{
	public static void main ( String[] args )
	{
		Scanner sc = new Scanner ( System.in );
		String[] str = new String[ sc.nextInt () ];
		sc.nextInt ();

		for ( int i = 0; i < str.length; i++ )
		{
			str[ i ] = sc.next ();
		}

		new Main ().run ( str );
	}

	public void run ( String[] str )
	{
		Arrays.sort ( str , 0 , str.length );

		String result = "";

		for ( int i = 0; i < str.length; i++ )
		{
			result = result + str[ i ];
		}

		System.out.println ( result );
	}

}
