"use strict";
    
const main = arg => {
    arg = arg.split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const L = parseInt(arg[0].split(" ")[1]);
    const S = arg.slice(1, N + 1);
    
    console.log(S.sort().join(""));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));