// https://atcoder.jp/contests/abc049/tasks/abc049_b
// AtCoder Beginner Contest 049
// B - たてなが

function main(arg) {
  const args = arg.split('\n');
  
  for (let i=1; i<args.length; i++) {
    console.log(args[i]);
    console.log(args[i]);
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
