import java.util.Scanner

fun main(args: Array<String>) {
	val scanner = Scanner(System.`in`)
	val n = scanner.nextInt()
	val l = scanner.nextInt()
	val arr = Array<String>(n){scanner.next()}
	arr.sort()
	arr.forEach(::print)
	println()
}