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

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

		int n = sc.nextInt();
		sc.next();

		String[] s = new String[n];

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

		Arrays.sort(s);

		for (String string : s) {
			System.out.print(string);
		}
		System.out.println();

		sc.close();
	}
}
 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);

		int n = sc.nextInt();
		sc.next();

		String[] s = new String[n];

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

		Arrays.sort(s);

		for (String string : s) {
			System.out.print(string);
		}
		System.out.println();

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

		int n = sc.nextInt();
		sc.next();

		String[] s = new String[n];

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

		Arrays.sort(s);

		for (String string : s) {
			System.out.print(string);
		}
		System.out.println();

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.next();

		String[] s = new String[n];

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

		Arrays.sort(s);

		for (String string : s) {
			System.out.print(string);
		}
		System.out.println();

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

		int n = sc.nextInt();
		sc.next();

		String[] s = new String[n];

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

		Arrays.sort(s);

		for (String string : s) {
			System.out.print(string);
		}
		System.out.println();

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

		int n = sc.nextInt();
		sc.next();

		String[] s = new String[n];

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

		Arrays.sort(s);

		for (String string : s) {
			System.out.print(string);
		}
		System.out.println();

		sc.close();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

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

		int n = sc.nextInt();
		sc.next();

		String[] s = new String[n];

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

		Arrays.sort(s);

		for (String string : s) {
			System.out.print(string);
		}
		System.out.println();

		sc.close();
	}
}

