open System;
[<EntryPoint>]
let main argv = 
    let res = seq { while true do yield System.Console.ReadLine() }
                |> Seq.takeWhile( (<>) null )
                |> Seq.map (fun x -> x + x)
                |> Seq.reduce (fun a b -> a + "\n" + b) 
    printfn "%s" res
    0