import java.util.*;
import java.io.*;
 
public class Main{
  
  static public void main(String args[]){
    
    Scanner sc = new Scanner(System.in);
    ArrayList<String> inputStr = new ArrayList<String>();
    String tmpStr;
    
    do{
      tmpStr = sc.next();
      inputStr.add(tmpStr);
    }while(sc.hasNext());
    
    int N = Integer.parseInt(inputStr.get(0));
    
    inputStr.remove(0);
    inputStr.remove(0);
    
    String words[] = new String[N];
    for(int i=0; i<N; i++){
      words[i] = inputStr.get(i);
    }
    
    Arrays.sort(words);
    
    for(int j=0; j<N; j++){
      System.out.printf("%s", words[j]);
    }
    
  }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
  
  static public void main(String args[]){
    
    Scanner sc = new Scanner(System.in);
    ArrayList<String> inputStr = new ArrayList<String>();
    String tmpStr;
    
    do{
      tmpStr = sc.next();
      inputStr.add(tmpStr);
    }while(sc.hasNext());
    
    int N = Integer.parseInt(inputStr.get(0));
    
    inputStr.remove(0);
    inputStr.remove(0);
    
    String words[] = new String[N];
    for(int i=0; i<N; i++){
      words[i] = inputStr.get(i);
    }
    
    Arrays.sort(words);
    
    for(int j=0; j<N; j++){
      System.out.printf("%s", words[j]);
    }
    
  }
} Main static public void main(String args[]){
    
    Scanner sc = new Scanner(System.in);
    ArrayList<String> inputStr = new ArrayList<String>();
    String tmpStr;
    
    do{
      tmpStr = sc.next();
      inputStr.add(tmpStr);
    }while(sc.hasNext());
    
    int N = Integer.parseInt(inputStr.get(0));
    
    inputStr.remove(0);
    inputStr.remove(0);
    
    String words[] = new String[N];
    for(int i=0; i<N; i++){
      words[i] = inputStr.get(i);
    }
    
    Arrays.sort(words);
    
    for(int j=0; j<N; j++){
      System.out.printf("%s", words[j]);
    }
    
  } main {
    
    Scanner sc = new Scanner(System.in);
    ArrayList<String> inputStr = new ArrayList<String>();
    String tmpStr;
    
    do{
      tmpStr = sc.next();
      inputStr.add(tmpStr);
    }while(sc.hasNext());
    
    int N = Integer.parseInt(inputStr.get(0));
    
    inputStr.remove(0);
    inputStr.remove(0);
    
    String words[] = new String[N];
    for(int i=0; i<N; i++){
      words[i] = inputStr.get(i);
    }
    
    Arrays.sort(words);
    
    for(int j=0; j<N; j++){
      System.out.printf("%s", words[j]);
    }
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<String> inputStr = new ArrayList<String>(); inputStr new ArrayList<String>() String tmpStr; tmpStr do{
      tmpStr = sc.next();
      inputStr.add(tmpStr);
    }while(sc.hasNext()); sc.hasNext() sc.hasNext sc {
      tmpStr = sc.next();
      inputStr.add(tmpStr);
    } tmpStr = sc.next() tmpStr sc.next() sc.next sc inputStr.add(tmpStr) inputStr.add inputStr tmpStr int N = Integer.parseInt(inputStr.get(0)); N Integer.parseInt(inputStr.get(0)) Integer.parseInt Integer inputStr.get(0) inputStr.get inputStr 0 inputStr.remove(0) inputStr.remove inputStr 0 inputStr.remove(0) inputStr.remove inputStr 0 String words[] = new String[N]; words new String[N] N for(int i=0; i<N; i++){
      words[i] = inputStr.get(i);
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      words[i] = inputStr.get(i);
    } {
      words[i] = inputStr.get(i);
    } words[i] = inputStr.get(i) words[i] words i inputStr.get(i) inputStr.get inputStr i Arrays.sort(words) Arrays.sort Arrays words for(int j=0; j<N; j++){
      System.out.printf("%s", words[j]);
    } int j=0; int j=0; j 0 j<N j N j++ j++ j {
      System.out.printf("%s", words[j]);
    } {
      System.out.printf("%s", words[j]);
    } System.out.printf("%s", words[j]) System.out.printf System.out System System.out "%s" words[j] words j String args[] args public class Main{
  
  static public void main(String args[]){
    
    Scanner sc = new Scanner(System.in);
    ArrayList<String> inputStr = new ArrayList<String>();
    String tmpStr;
    
    do{
      tmpStr = sc.next();
      inputStr.add(tmpStr);
    }while(sc.hasNext());
    
    int N = Integer.parseInt(inputStr.get(0));
    
    inputStr.remove(0);
    inputStr.remove(0);
    
    String words[] = new String[N];
    for(int i=0; i<N; i++){
      words[i] = inputStr.get(i);
    }
    
    Arrays.sort(words);
    
    for(int j=0; j<N; j++){
      System.out.printf("%s", words[j]);
    }
    
  }
} public class Main{
  
  static public void main(String args[]){
    
    Scanner sc = new Scanner(System.in);
    ArrayList<String> inputStr = new ArrayList<String>();
    String tmpStr;
    
    do{
      tmpStr = sc.next();
      inputStr.add(tmpStr);
    }while(sc.hasNext());
    
    int N = Integer.parseInt(inputStr.get(0));
    
    inputStr.remove(0);
    inputStr.remove(0);
    
    String words[] = new String[N];
    for(int i=0; i<N; i++){
      words[i] = inputStr.get(i);
    }
    
    Arrays.sort(words);
    
    for(int j=0; j<N; j++){
      System.out.printf("%s", words[j]);
    }
    
  }
} Main
import java.util.*;
import java.io.*;
 
public class Main{
  
  static public void main(String args[]){
    
    Scanner sc = new Scanner(System.in);
    ArrayList<String> inputStr = new ArrayList<String>();
    String tmpStr;
    
    do{
      tmpStr = sc.next();
      inputStr.add(tmpStr);
    }while(sc.hasNext());
    
    int N = Integer.parseInt(inputStr.get(0));
    
    inputStr.remove(0);
    inputStr.remove(0);
    
    String words[] = new String[N];
    for(int i=0; i<N; i++){
      words[i] = inputStr.get(i);
    }
    
    Arrays.sort(words);
    
    for(int j=0; j<N; j++){
      System.out.printf("%s", words[j]);
    }
    
  }
}