Problem:
Score : 200 points

Problem Statement

There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either . or *. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.

Extend this image vertically so that its height is doubled. That is, print a image with a height of 2H pixels and a width of W pixels where the pixel at the i-th row and j-th column is equal to C_{(i+1)/2,j} (the result of division is rounded down).

Constraints

1≦H, W≦100

C_{i,j} is either . or *.

Input

The input is given from Standard Input in the following format:

H W
C_{1,1}...C_{1,W}
:
C_{H,1}...C_{H,W}

Output

Print the extended image.

Sample Input 1

2 2
*.
.*

Sample Output 1

*.
*.
.*
.*

Sample Input 2

1 4
***.

Sample Output 2

***.
***.

Sample Input 3

9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**.........

Sample Output 3

.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**..*...**.....
.....**..*...**.....
.......*..*.*.......
.......*..*.*.......
........**.*........
........**.*........
.........**.........
.........**.........

Solution in Rust (1.15.1) (judge verdict: Accepted)

use std::io::prelude::*;
use std::io;
use std::str::FromStr;
#[cfg(local)]
use std::fs::File;
#[cfg(local)]
use std::io::BufReader;

#[cfg(local)]
fn buf_read() -> io::Result<(Vec<String>)> {
    let f = try!(File::open("input.txt"));
    let input_lines: Vec<_> = BufReader::new(f).lines().collect();
    let lines: Vec<String> = input_lines.into_iter().map(|e| e.unwrap()).collect();
    Ok((lines))
}

#[cfg(not(local))]
fn buf_read() -> io::Result<(Vec<String>)> {
    let stdin = io::stdin();
    let input_lines: Vec<_> = stdin.lock().lines().collect();
    let lines: Vec<String> = input_lines.into_iter().map(|e| e.unwrap()).collect();
    Ok((lines))
}

fn main() {
    type Element = String;
    let input = buf_read().unwrap();
    let mut input_vectors: Vec<Vec<Element>> = vec![];
    for input_line in input {
        let input_str: Vec<String> = input_line.split(' ').map(String::from).collect();
        let mut input_vector: Vec<Element> = vec![];
        for input_elem_str in input_str {
            let elem: Element = Element::from_str(input_elem_str.as_str()).unwrap();
            input_vector.push(elem);
        }
        input_vectors.push(input_vector);
    }
    // let h = usize::from_str(input_vectors[0][0]);
    let h = input_vectors[0][0].parse::<i64>().unwrap() as usize;
    // for str in input_vectors[1].iter() {
    for i in 1..h + 1 {
        println!("{}", input_vectors[i][0]);
        println!("{}", input_vectors[i][0]);
    }
}