object Main extends App {
    val in = io.Source.stdin.getLines.map(_.split(" ").map(d => if (d.size == 1) '0' + d else d)).toSeq
    println(in.flatMap(_.tail.grouped(2).map(x => x(0) + ':' + x(1))).sorted.distinct.map(s =>
        if (s(0) == '0' && s(2) == ':') s.tail else s
    ).mkString(" "))
}