'use strict'

function Main(input) {
    const pix = input.split('\n');
    pix.shift();

    const tatePix = [];
    pix.forEach(v => {
        tatePix.push(v);
        tatePix.push(v);
    });

    for (const v of tatePix) {
        console.log(v);
    }
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
