import std.stdio, std.string, std.array, std.conv, std.algorithm, std.typecons, std.range, std.container, std.math, std.algorithm.searching, std.functional;

void main(){
    auto nl=readln().split.map!(to!int).array;
    auto ss=iota(0,nl[0]).map!(l=>readln().chomp).array;
    ss.sort();
    writeln(ss.join);
}