import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

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

	public void exec(Scanner sc) {
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<String> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		System.out.println(String.join("", list));
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			new Main().exec(sc);
		}
	}

	public void exec(Scanner sc) {
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<String> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		System.out.println(String.join("", list));
	}
} Main public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			new Main().exec(sc);
		}
	} main {
		try (Scanner sc = new Scanner(System.in)) {
			new Main().exec(sc);
		}
	} try (Scanner sc = new Scanner(System.in)) {
			new Main().exec(sc);
		} {
			new Main().exec(sc);
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) new Main().exec(sc) new Main().exec new Main() sc String[] args args public void exec(Scanner sc) {
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<String> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		System.out.println(String.join("", list));
	} exec {
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<String> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		System.out.println(String.join("", list));
	} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc List<String> list = new ArrayList<>(); list new ArrayList<>() for (int i = 0; i < n; i++) {
			list.add(sc.next());
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			list.add(sc.next());
		} {
			list.add(sc.next());
		} list.add(sc.next()) list.add list sc.next() sc.next sc Collections.sort(list) Collections.sort Collections list System.out.println(String.join("", list)) System.out.println System.out System System.out String.join("", list) String.join String "" list Scanner sc sc public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			new Main().exec(sc);
		}
	}

	public void exec(Scanner sc) {
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<String> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		System.out.println(String.join("", list));
	}
} public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			new Main().exec(sc);
		}
	}

	public void exec(Scanner sc) {
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<String> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		System.out.println(String.join("", list));
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

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

	public void exec(Scanner sc) {
		int n = sc.nextInt();
		int l = sc.nextInt();
		List<String> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		System.out.println(String.join("", list));
	}
}
