"use strict"
function main(arg) {
  const data = arg.trim().split("\n")  
  console.log(solve(data.slice(1)))
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

function solve(arr) {
  arr.sort((s1, s2) => s1.localeCompare(s2))
  return arr.join('')
}


