  // B - 文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition) https://atcoder.jp/contests/abc042/tasks/abc042_b

  import io.Source

  object Main extends App {
    val xs = Source.stdin.getLines()
    xs.next() // N, Lをスキップ

    solve(xs)

    def solve(xs: Iterator[String]): String = {
      xs.toSeq.sorted.foreach(println)
      ""
    }
  }
