'use strict'

function main(s) {

  s = s.split('\n').slice(1, -1);

  const ans = [];

  for (const line of s) {
    ans.push(line);
    ans.push(line);
  }

  console.log(ans.join('\n'));
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
