let rec read_lines () =
	try let line = read_line () in line :: read_lines ()
    with End_of_file -> []
let n, l = Scanf.scanf "%d %d\n" @@ fun a b -> a, b
let s = List.fast_sort compare (read_lines ())
let ans = List.fold_left (^) "" s