import java.util.Arrays;
import java.util.Scanner;
 
class Main {
	int n;
	int l;
	String[] s;
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Main m = new Main(sc);
		m.solve();
		sc.close();
	}
	Main(Scanner sc){
		n = sc.nextInt();
		l = sc.nextInt();
		s = new String[n];
		for(int i=0;i<n;i++){
			s[i] = sc.next();
		}
	}
	void solve(){
		Arrays.sort(s);
		for(int i=0;i<n;i++){
			System.out.print(s[i]);
		}
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {
	int n;
	int l;
	String[] s;
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Main m = new Main(sc);
		m.solve();
		sc.close();
	}
	Main(Scanner sc){
		n = sc.nextInt();
		l = sc.nextInt();
		s = new String[n];
		for(int i=0;i<n;i++){
			s[i] = sc.next();
		}
	}
	void solve(){
		Arrays.sort(s);
		for(int i=0;i<n;i++){
			System.out.print(s[i]);
		}
	}
} Main int n; n int l; l String[] s; s public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Main m = new Main(sc);
		m.solve();
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		Main m = new Main(sc);
		m.solve();
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Main m = new Main(sc); m new Main(sc) m.solve() m.solve m sc.close() sc.close sc String[] args args Main(Scanner sc){
		n = sc.nextInt();
		l = sc.nextInt();
		s = new String[n];
		for(int i=0;i<n;i++){
			s[i] = sc.next();
		}
	} Main {
		n = sc.nextInt();
		l = sc.nextInt();
		s = new String[n];
		for(int i=0;i<n;i++){
			s[i] = sc.next();
		}
	} n = sc.nextInt() n sc.nextInt() sc.nextInt sc l = sc.nextInt() l sc.nextInt() sc.nextInt sc s = new String[n] s new String[n] n for(int i=0;i<n;i++){
			s[i] = sc.next();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			s[i] = sc.next();
		} {
			s[i] = sc.next();
		} s[i] = sc.next() s[i] s i sc.next() sc.next sc Scanner sc sc void solve(){
		Arrays.sort(s);
		for(int i=0;i<n;i++){
			System.out.print(s[i]);
		}
	} solve {
		Arrays.sort(s);
		for(int i=0;i<n;i++){
			System.out.print(s[i]);
		}
	} Arrays.sort(s) Arrays.sort Arrays s for(int i=0;i<n;i++){
			System.out.print(s[i]);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			System.out.print(s[i]);
		} {
			System.out.print(s[i]);
		} System.out.print(s[i]) System.out.print System.out System System.out s[i] s i
import java.util.Arrays;
import java.util.Scanner;
 
class Main {
	int n;
	int l;
	String[] s;
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Main m = new Main(sc);
		m.solve();
		sc.close();
	}
	Main(Scanner sc){
		n = sc.nextInt();
		l = sc.nextInt();
		s = new String[n];
		for(int i=0;i<n;i++){
			s[i] = sc.next();
		}
	}
	void solve(){
		Arrays.sort(s);
		for(int i=0;i<n;i++){
			System.out.print(s[i]);
		}
	}
}