fun main(args: Array<String>) {
    val (h,w) = readLine()!!.split(" ").map(String::toInt)
    var p : MutableList<String> = mutableListOf()
    repeat(h) {p.add(readLine()!!)}
    p.forEach {
        println(it)
        println(it)
    }

}