프로그램 명: coci_okvir
제한시간: 1 초

[요약] 주어진 N*M 문자 행렬을 위로 U칸, 아래로 D칸, 왼쪽으로 L칸, 오른쪽으로 R칸 확장한 후 확장된 곳은 '#'와 '.'이 번갈아 나오게 해서 출력하여라. (1행 1열이 #가 되도록 배열)


Mirko has assembled an excellent crossword puzzle and now he wants to frame it. Mirko's crossword puzzle consists of M x N letters, and the frame around it should be U characters wide on top, L characters on the left, R characters on the right and D characters on the bottom side.

The frame consists of characters # (hash) and . (dot) which alternate like fields on a chessboard. These characters should be arranged in a way that, if the frame is expanded to cover the entire crossword puzzle and we treat these characters as a chessboard, the # characters should be placed as the red fields on a chessboard (i.e. the top left field). See the examples below for a better understanding of the task.

입력

출력

Output the framed crossword puzzle as stated in the text.

입출력 예

input 
 
4 4 
2 2 2 2 
honi 
oker 
nera 
irak 
 
output 
 
#.#.#.#. 
.#.#.#.# 
#.honi#. 
.#oker.# 
#.nera#. 
.#irak.# 
#.#.#.#. 
.#.#.#.# 
input 
 
2 4 
1 0 3 1 
rima 
mama 
 
output 
 
#.#.#.# 
rima.#. 
mama#.# 
.#.#.#. 
출처:coci/2013-2014/contest3 2/6
요약:Cauchy

[질/답] [제출 현황] [푼 후(0)]
[ 채 점 ] [홈으로]  [뒤 로]