import java.util.*;
import java.io.*;
public class Main{
	public static void main(String[] args) throws IOException{
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] list = reader.readLine().split(" ");
        int t = Integer.parseInt(list[0]);
        String[] l = new String[t];
        for(int i = 0 ;i<t;i++){
            l[i] = reader.readLine();
        }
        Arrays.sort(l);
        for(String p:l){
        	System.out.print(p);
            }
	}}
         import java.util.*; util.* java import java.io.*; io.* java public class Main{
	public static void main(String[] args) throws IOException{
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] list = reader.readLine().split(" ");
        int t = Integer.parseInt(list[0]);
        String[] l = new String[t];
        for(int i = 0 ;i<t;i++){
            l[i] = reader.readLine();
        }
        Arrays.sort(l);
        for(String p:l){
        	System.out.print(p);
            }
	}} Main public static void main(String[] args) throws IOException{
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] list = reader.readLine().split(" ");
        int t = Integer.parseInt(list[0]);
        String[] l = new String[t];
        for(int i = 0 ;i<t;i++){
            l[i] = reader.readLine();
        }
        Arrays.sort(l);
        for(String p:l){
        	System.out.print(p);
            }
	} main {
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] list = reader.readLine().split(" ");
        int t = Integer.parseInt(list[0]);
        String[] l = new String[t];
        for(int i = 0 ;i<t;i++){
            l[i] = reader.readLine();
        }
        Arrays.sort(l);
        for(String p:l){
        	System.out.print(p);
            }
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String[] list = reader.readLine().split(" "); list reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " int t = Integer.parseInt(list[0]); t Integer.parseInt(list[0]) Integer.parseInt Integer list[0] list 0 String[] l = new String[t]; l new String[t] t for(int i = 0 ;i<t;i++){
            l[i] = reader.readLine();
        } int i = 0 ; int i = 0 ; i 0 i<t i t i++ i++ i {
            l[i] = reader.readLine();
        } {
            l[i] = reader.readLine();
        } l[i] = reader.readLine() l[i] l i reader.readLine() reader.readLine reader Arrays.sort(l) Arrays.sort Arrays l for(String p:l){
        	System.out.print(p);
            } String p l {
        	System.out.print(p);
            } {
        	System.out.print(p);
            } System.out.print(p) System.out.print System.out System System.out p String[] args args public class Main{
	public static void main(String[] args) throws IOException{
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] list = reader.readLine().split(" ");
        int t = Integer.parseInt(list[0]);
        String[] l = new String[t];
        for(int i = 0 ;i<t;i++){
            l[i] = reader.readLine();
        }
        Arrays.sort(l);
        for(String p:l){
        	System.out.print(p);
            }
	}} public class Main{
	public static void main(String[] args) throws IOException{
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] list = reader.readLine().split(" ");
        int t = Integer.parseInt(list[0]);
        String[] l = new String[t];
        for(int i = 0 ;i<t;i++){
            l[i] = reader.readLine();
        }
        Arrays.sort(l);
        for(String p:l){
        	System.out.print(p);
            }
	}} Main
import java.util.*;
import java.io.*;
public class Main{
	public static void main(String[] args) throws IOException{
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] list = reader.readLine().split(" ");
        int t = Integer.parseInt(list[0]);
        String[] l = new String[t];
        for(int i = 0 ;i<t;i++){
            l[i] = reader.readLine();
        }
        Arrays.sort(l);
        for(String p:l){
        	System.out.print(p);
            }
	}}
        