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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] ary = new String[sc.nextInt()];
		sc.next();
		for(int i=0;i < ary.length;i++) {
			ary[i] = sc.next();
		}
		Arrays.parallelSort(ary);
		for (String string : ary) {
			System.out.print(string);
		}
		System.out.println();
	}
} 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[] ary = new String[sc.nextInt()];
		sc.next();
		for(int i=0;i < ary.length;i++) {
			ary[i] = sc.next();
		}
		Arrays.parallelSort(ary);
		for (String string : ary) {
			System.out.print(string);
		}
		System.out.println();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] ary = new String[sc.nextInt()];
		sc.next();
		for(int i=0;i < ary.length;i++) {
			ary[i] = sc.next();
		}
		Arrays.parallelSort(ary);
		for (String string : ary) {
			System.out.print(string);
		}
		System.out.println();
	} main {
		Scanner sc = new Scanner(System.in);
		String[] ary = new String[sc.nextInt()];
		sc.next();
		for(int i=0;i < ary.length;i++) {
			ary[i] = sc.next();
		}
		Arrays.parallelSort(ary);
		for (String string : ary) {
			System.out.print(string);
		}
		System.out.println();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] ary = new String[sc.nextInt()]; ary new String[sc.nextInt()] sc.nextInt() sc.nextInt sc sc.next() sc.next sc for(int i=0;i < ary.length;i++) {
			ary[i] = sc.next();
		} int i=0; int i=0; i 0 i < ary.length i ary.length ary ary.length i++ i++ i {
			ary[i] = sc.next();
		} {
			ary[i] = sc.next();
		} ary[i] = sc.next() ary[i] ary i sc.next() sc.next sc Arrays.parallelSort(ary) Arrays.parallelSort Arrays ary for (String string : ary) {
			System.out.print(string);
		} String string ary {
			System.out.print(string);
		} {
			System.out.print(string);
		} System.out.print(string) System.out.print System.out System System.out string System.out.println() System.out.println System.out System System.out String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] ary = new String[sc.nextInt()];
		sc.next();
		for(int i=0;i < ary.length;i++) {
			ary[i] = sc.next();
		}
		Arrays.parallelSort(ary);
		for (String string : ary) {
			System.out.print(string);
		}
		System.out.println();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] ary = new String[sc.nextInt()];
		sc.next();
		for(int i=0;i < ary.length;i++) {
			ary[i] = sc.next();
		}
		Arrays.parallelSort(ary);
		for (String string : ary) {
			System.out.print(string);
		}
		System.out.println();
	}
} 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[] ary = new String[sc.nextInt()];
		sc.next();
		for(int i=0;i < ary.length;i++) {
			ary[i] = sc.next();
		}
		Arrays.parallelSort(ary);
		for (String string : ary) {
			System.out.print(string);
		}
		System.out.println();
	}
}