function Main() {
  const input = require("fs").readFileSync("/dev/stdin", "utf-8").trim();
  const lines = input.split('\n');
  const n = lines[0].split(' ')[0];
  const l = lines[0].split(' ')[1];
  const strs = lines.slice(1);
  strs.sort();
  console.log(strs.join(''));
}

Main();
