'use strict'

const Main = (input) => {
  const tmp = input.trim().split('\n')
  const N = parseInt(tmp[0].split(' ')[0])
  const L = parseInt(tmp[0].split(' ')[1])

  const Sarr = []
  for (let i = 1; i < tmp.length; i++) {
    Sarr.push(tmp[i])
  }

  let result = Sarr.sort().join('')

  console.log(result)
  return result
}

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