import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(), l=sc.nextInt(), i, j;
        String[] s = new String[101];
        String tmp;
        for(i=0;i<n;i++)
            s[i] = sc.next();
        for(i=0;i<n;i++){
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        }
        for(i=0;i<n;i++)
            System.out.print(s[i]);
        System.out.println();
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(), l=sc.nextInt(), i, j;
        String[] s = new String[101];
        String tmp;
        for(i=0;i<n;i++)
            s[i] = sc.next();
        for(i=0;i<n;i++){
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        }
        for(i=0;i<n;i++)
            System.out.print(s[i]);
        System.out.println();
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(), l=sc.nextInt(), i, j;
        String[] s = new String[101];
        String tmp;
        for(i=0;i<n;i++)
            s[i] = sc.next();
        for(i=0;i<n;i++){
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        }
        for(i=0;i<n;i++)
            System.out.print(s[i]);
        System.out.println();
    } main {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(), l=sc.nextInt(), i, j;
        String[] s = new String[101];
        String tmp;
        for(i=0;i<n;i++)
            s[i] = sc.next();
        for(i=0;i<n;i++){
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        }
        for(i=0;i<n;i++)
            System.out.print(s[i]);
        System.out.println();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt() n sc.nextInt() sc.nextInt sc l=sc.nextInt() l sc.nextInt() sc.nextInt sc i i j; j String[] s = new String[101]; s new String[101] 101 String tmp; tmp for(i=0;i<n;i++)
            s[i] = sc.next(); i=0; i=0 i 0 i<n i n i++ i++ i s[i] = sc.next(); s[i] = sc.next() s[i] s i sc.next() sc.next sc for(i=0;i<n;i++){
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        } i=0; i=0 i 0 i<n i n i++ i++ i {
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        } {
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        } for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            } j=i+1; j=i+1 j i+1 i 1 j<n j n j++ j++ j {
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            } {
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            } if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                } s[i].compareTo(s[j])>0 s[i].compareTo(s[j]) s[i].compareTo s[i] s i s[j] s j 0 {
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                } tmp = s[i] tmp s[i] s i s[i] = s[j] s[i] s i s[j] s j s[j] = tmp s[j] s j tmp for(i=0;i<n;i++)
            System.out.print(s[i]); i=0; i=0 i 0 i<n i n i++ i++ i System.out.print(s[i]); System.out.print(s[i]) System.out.print System.out System System.out s[i] s i System.out.println() System.out.println System.out System System.out String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(), l=sc.nextInt(), i, j;
        String[] s = new String[101];
        String tmp;
        for(i=0;i<n;i++)
            s[i] = sc.next();
        for(i=0;i<n;i++){
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        }
        for(i=0;i<n;i++)
            System.out.print(s[i]);
        System.out.println();
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(), l=sc.nextInt(), i, j;
        String[] s = new String[101];
        String tmp;
        for(i=0;i<n;i++)
            s[i] = sc.next();
        for(i=0;i<n;i++){
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        }
        for(i=0;i<n;i++)
            System.out.print(s[i]);
        System.out.println();
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt(), l=sc.nextInt(), i, j;
        String[] s = new String[101];
        String tmp;
        for(i=0;i<n;i++)
            s[i] = sc.next();
        for(i=0;i<n;i++){
            for(j=i+1;j<n;j++){
                if(s[i].compareTo(s[j])>0){
                    tmp = s[i];
                    s[i] = s[j];
                    s[j] = tmp;
                }
            }
        }
        for(i=0;i<n;i++)
            System.out.print(s[i]);
        System.out.println();
    }
}
