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

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    int L;
    String[] S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
        this.L = sc.nextInt();
        S = new String[N];
        for (int i=0; i<N; i++) {
        	S[i] = sc.next();
        }
    }
    
    //解答処理
    private String solve() {
    	Arrays.sort(S);
    	
        String answer = null;
        StringBuilder sb = new StringBuilder(); 
        for (int i=0; i<N; i++) {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        }
        
        answer = sb.toString();
        return answer;
    }
    
    //出力
    public void show(String answer) {
        System.out.println(answer);
    }

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    int L;
    String[] S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
        this.L = sc.nextInt();
        S = new String[N];
        for (int i=0; i<N; i++) {
        	S[i] = sc.next();
        }
    }
    
    //解答処理
    private String solve() {
    	Arrays.sort(S);
    	
        String answer = null;
        StringBuilder sb = new StringBuilder(); 
        for (int i=0; i<N; i++) {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        }
        
        answer = sb.toString();
        return answer;
    }
    
    //出力
    public void show(String answer) {
        System.out.println(answer);
    }

} Main //フィールド
    Scanner sc; sc int N; N int L; L String[] S; S public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(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.show(m.solve()) m.show m m.solve() m.solve m sc.close() sc.close sc String[] args args //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
        this.L = sc.nextInt();
        S = new String[N];
        for (int i=0; i<N; i++) {
        	S[i] = sc.next();
        }
    } Main {
        this.sc = sc;
        this.N = sc.nextInt();
        this.L = sc.nextInt();
        S = new String[N];
        for (int i=0; i<N; i++) {
        	S[i] = sc.next();
        }
    } this.sc = sc this.sc this this.sc sc this.N = sc.nextInt() this.N this this.N sc.nextInt() sc.nextInt sc this.L = sc.nextInt() this.L this this.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 //解答処理
    private String solve() {
    	Arrays.sort(S);
    	
        String answer = null;
        StringBuilder sb = new StringBuilder(); 
        for (int i=0; i<N; i++) {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        }
        
        answer = sb.toString();
        return answer;
    } solve {
    	Arrays.sort(S);
    	
        String answer = null;
        StringBuilder sb = new StringBuilder(); 
        for (int i=0; i<N; i++) {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        }
        
        answer = sb.toString();
        return answer;
    } Arrays.sort(S) Arrays.sort Arrays S String answer = null; answer null StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i=0; i<N; i++) {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        } {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        } StringBuilder tmp = new StringBuilder(S[i]); tmp new StringBuilder(S[i]) sb.append(tmp) sb.append sb tmp answer = sb.toString() answer sb.toString() sb.toString sb return answer; answer //出力
    public void show(String answer) {
        System.out.println(answer);
    } show {
        System.out.println(answer);
    } System.out.println(answer) System.out.println System.out System System.out answer String answer answer public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    int L;
    String[] S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
        this.L = sc.nextInt();
        S = new String[N];
        for (int i=0; i<N; i++) {
        	S[i] = sc.next();
        }
    }
    
    //解答処理
    private String solve() {
    	Arrays.sort(S);
    	
        String answer = null;
        StringBuilder sb = new StringBuilder(); 
        for (int i=0; i<N; i++) {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        }
        
        answer = sb.toString();
        return answer;
    }
    
    //出力
    public void show(String answer) {
        System.out.println(answer);
    }

} public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    int L;
    String[] S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
        this.L = sc.nextInt();
        S = new String[N];
        for (int i=0; i<N; i++) {
        	S[i] = sc.next();
        }
    }
    
    //解答処理
    private String solve() {
    	Arrays.sort(S);
    	
        String answer = null;
        StringBuilder sb = new StringBuilder(); 
        for (int i=0; i<N; i++) {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        }
        
        answer = sb.toString();
        return answer;
    }
    
    //出力
    public void show(String answer) {
        System.out.println(answer);
    }

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

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    int L;
    String[] S;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
        this.L = sc.nextInt();
        S = new String[N];
        for (int i=0; i<N; i++) {
        	S[i] = sc.next();
        }
    }
    
    //解答処理
    private String solve() {
    	Arrays.sort(S);
    	
        String answer = null;
        StringBuilder sb = new StringBuilder(); 
        for (int i=0; i<N; i++) {
        	StringBuilder tmp = new StringBuilder(S[i]);
        	sb.append(tmp);
        }
        
        answer = sb.toString();
        return answer;
    }
    
    //出力
    public void show(String answer) {
        System.out.println(answer);
    }

}
