PivotOJ

Bold

시간 제한: 1000ms메모리 제한: 512MB출처: COCI 2020-2021BOJ 21221

문제

In addition to the usual age-related health problems such as first signs of RSI1 and physical injuries that accumulate faster than they heal, Daniel’s eyesight has suddenly worsened.

Paula wrote him a letter, but he can’t read it without glasses. She needs to bold the text, so Daniel can read it.

The letter can be represented as a matrix consisting of characters '.' and '#'. To bold it, Paula will replace each '#' in the original letter with a 2 × 2 square of '#' in the down-right direction.

1Repetitive strain injury. Never ignore the pain caused by typing. Ergonomic aids and chairs are generally always worth it. Sit straight. “A gram of prevention is worth a kilo of cure.”

입력

The first line contains integers n and m (2 ≤ n, m ≤ 100), the dimensions of the letter.

Each of the following n lines contains m characters '.' and '#' that represent Paula’s letter.

The last row and column won’t contain any '#'.

출력

Output n lines containing m characters '.' and '#', representing the bold letter.

예제

예제 1

입력
4 4
....
.#..
....
....
출력
....
.##.
.##.
....

예제 2

입력
7 7
.......
.####..
.#...#.
.#...#.
.#...#.
.####..
.......
출력
.......
.#####.
.######
.##..##
.##..##
.######
.#####.

예제 3

입력
9 7
.......
.####..
.#...#.
.#...#.
.####..
.#.....
.#.....
.#.....
.......
출력
.......
.#####.
.######
.##..##
.######
.#####.
.##....
.##....
.##....
코드를 제출하려면 로그인하세요.