let r_long () = Int64.of_int (Scanf.scanf " %d" (fun x -> x)) ;;
let r_int () = Scanf.scanf " %d" (fun x -> x) ;;
let n=r_int() in
let l=r_int() in
let a=Array.make n "" in
for i=0 to n-1 do
let s=read_line() in
a.(i)<-s;
done;
Array.sort String.compare a;
for i=0 to n-1 do
print_string a.(i);
done;
print_newline();
