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

class Main {
    public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            int count = Integer.parseInt(Arrays.asList(br.readLine().split(" ")).get(0));
            String[] strList = new String[count];
            for (int i = 0; i < count; i++) {
                strList[i] = br.readLine();
            }

            Arrays.sort(strList);
            for (int i = 0; i < count; i++) {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util class Main {
    public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            int count = Integer.parseInt(Arrays.asList(br.readLine().split(" ")).get(0));
            String[] strList = new String[count];
            for (int i = 0; i < count; i++) {
                strList[i] = br.readLine();
            }

            Arrays.sort(strList);
            for (int i = 0; i < count; i++) {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
} Main public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            int count = Integer.parseInt(Arrays.asList(br.readLine().split(" ")).get(0));
            String[] strList = new String[count];
            for (int i = 0; i < count; i++) {
                strList[i] = br.readLine();
            }

            Arrays.sort(strList);
            for (int i = 0; i < count; i++) {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } main {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            int count = Integer.parseInt(Arrays.asList(br.readLine().split(" ")).get(0));
            String[] strList = new String[count];
            for (int i = 0; i < count; i++) {
                strList[i] = br.readLine();
            }

            Arrays.sort(strList);
            for (int i = 0; i < count; i++) {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            int count = Integer.parseInt(Arrays.asList(br.readLine().split(" ")).get(0));
            String[] strList = new String[count];
            for (int i = 0; i < count; i++) {
                strList[i] = br.readLine();
            }

            Arrays.sort(strList);
            for (int i = 0; i < count; i++) {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } IOException | NumberFormatException e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } final Exception e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 {
            int count = Integer.parseInt(Arrays.asList(br.readLine().split(" ")).get(0));
            String[] strList = new String[count];
            for (int i = 0; i < count; i++) {
                strList[i] = br.readLine();
            }

            Arrays.sort(strList);
            for (int i = 0; i < count; i++) {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            }
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) int count = Integer.parseInt(Arrays.asList(br.readLine().split(" ")).get(0)); count Integer.parseInt(Arrays.asList(br.readLine().split(" ")).get(0)) Integer.parseInt Integer Arrays.asList(br.readLine().split(" ")).get(0) Arrays.asList(br.readLine().split(" ")).get Arrays.asList(br.readLine().split(" ")) Arrays.asList Arrays br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " 0 String[] strList = new String[count]; strList new String[count] count for (int i = 0; i < count; i++) {
                strList[i] = br.readLine();
            } int i = 0; int i = 0; i 0 i < count i count i++ i++ i {
                strList[i] = br.readLine();
            } {
                strList[i] = br.readLine();
            } strList[i] = br.readLine() strList[i] strList i br.readLine() br.readLine br Arrays.sort(strList) Arrays.sort Arrays strList for (int i = 0; i < count; i++) {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            } int i = 0; int i = 0; i 0 i < count i count i++ i++ i {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            } {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            } if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                } i == count - 1 i count - 1 count 1 {
                    System.out.println(strList[i]);
                } System.out.println(strList[i]) System.out.println System.out System System.out strList[i] strList i {
                    System.out.print(strList[i]);
                } System.out.print(strList[i]) System.out.print System.out System System.out strList[i] strList i final String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

class Main {
    public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            int count = Integer.parseInt(Arrays.asList(br.readLine().split(" ")).get(0));
            String[] strList = new String[count];
            for (int i = 0; i < count; i++) {
                strList[i] = br.readLine();
            }

            Arrays.sort(strList);
            for (int i = 0; i < count; i++) {
                if (i == count - 1) {
                    System.out.println(strList[i]);
                } else {
                    System.out.print(strList[i]);
                }
            }
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
}