function Main(input) {
  input = input.split("\n");
  const N = input[0].split(" ")[0];
  var strs = input.slice(1, N + 1);

  var ans = strs.sort().join("");
  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
