import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;

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

public class Main {
  public static void main(String[] args) throws IOException{
    String[] strs;
    String[] list = null;
    try(BufferedReader br 
        = new BufferedReader(new InputStreamReader(System.in))
    ){
      strs = br.readLine().split(" ");
      int N = Integer.parseInt(strs[0]);
      list = new String[N];
      for (int i = 0; i < N; i++) {
        list[i] = br.readLine();
      }
    }
    
    Arrays.sort(list);
    
    for (String s : list) {
      System.out.print(s);
    }
  }
}