시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 515 396 360 79.646%

문제

JOI시는 남북방향이 H 킬로미터, 동서방향이 W 킬로미터인 직사각형 모양이다. JOI시는 가로와 세로의 길이가 1킬로미터인 H × W 개의 작은 구역들로 나뉘어 있다. 북쪽으로부터 i 번째, 서쪽으로부터 j 번째에 있는 구역을 (i, j) 로 표시한다.

각 구역의 하늘에는 구름이 있을 수도, 없을 수도 있다. 모든 구름은 1분이 지날 때마다 1킬로미터씩 동쪽으로 이동한다. 오늘은 날씨가 정말 좋기 때문에 JOI시의 외부에서 구름이 이동해 오는 경우는 없다.

지금 각 구역의 하늘에 구름이 있는지 없는지를 알고 있다. 기상청에서 일하고 있는 여러분은 각 구역에 대해서 지금부터 몇 분뒤 처음으로 하늘에 구름이 오는지를 예측하는 일을 맡았다.

각 구역에 대해서 지금부터 몇 분뒤 처음으로 하늘에 구름이 오는지를 구하여라.

입력

입력은 1 + H 행으로 주어진다.

첫 번째 행에는 정수 H, W (1 ≦ H ≦ 100, 1 ≦ W ≦ 100) 가 공백을 사이에 주고 주어진다. 이것은 JOI시가 H × W 개의 작은 구역으로 나뉘어 있다는 것을 의미한다.

이어진 H 개의 행의 i번째 행 (1 ≦ i ≦ H) 에는 W문자의 문자열이 주어진다. W 개의 문자 중 j번째 문자 (1 ≦ j ≦ W) 는, 구역 (i, j) 에 지금 구름이 떠 있는지 아닌지를 나타낸다. 구름이 있는 경우에는 영어 소문자 'c' 가, 구름이 없는 경우에는 문자 '.' 가 주어진다.

출력

출력은 H 행으로, 각 행에는 공백으로 구분된 W 개의 정수를 출력한다. 출력의 i 번째 행 j 번째 정수 (1 ≦ i ≦ H, 1 ≦ j ≦ W) 는, 지금부터 몇 분후에 처음으로 구역 (i, j) 에 구름이 뜨는지를 표시한다. 단, 처음부터 구역 (i, j) 에 구름이 떠 있었던 경우에는 0을, 몇 분이 지나도 구름이 뜨지 않을 경우에는 -1을 출력한다.

예제 입력 1

3 4
c..c
..c.
....

예제 출력 1

0 1 2 0
-1 -1 0 1
-1 -1 -1 -1

예제 입력 2

6 8
.c......
........
.ccc..c.
....c...
..c.cc..
....c...

예제 출력 2

-1 0 1 2 3 4 5 6
-1 -1 -1 -1 -1 -1 -1 -1
-1 0 0 0 1 2 0 1
-1 -1 -1 -1 0 1 2 3
-1 -1 0 1 0 0 1 2
-1 -1 -1 -1 0 1 2 3

힌트

입출력 예제 1에서는, JOI시가 3 × 4 개의 작은 구역으로 나뉘어 있다. 지금 JOI시의 구름 상황은 아래와 같다. 그림의 위쪽이 북쪽이다.

1분 간격으로 구름은 다음과 같이 움직인다.

W3sicHJvYmxlbV9pZCI6IjEwNzA5IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVhZTMwXHVjMGMxXHVjZTkwXHVjMmE0XHVkMTMwIiwiZGVzY3JpcHRpb24iOiI8cD5KT0lcdWMyZGNcdWIyOTQgXHViMGE4XHViZDgxXHViYzI5XHVkNWE1XHVjNzc0IEggXHVkMGFjXHViODVjXHViYmY4XHVkMTMwLCBcdWIzZDlcdWMxMWNcdWJjMjlcdWQ1YTVcdWM3NzQgVyBcdWQwYWNcdWI4NWNcdWJiZjhcdWQxMzBcdWM3NzggXHVjOWMxXHVjMGFjXHVhYzAxXHVkNjE1IFx1YmFhOFx1YzU5MVx1Yzc3NFx1YjJlNC4gSk9JXHVjMmRjXHViMjk0IFx1YWMwMFx1Yjg1Y1x1YzY0MCBcdWMxMzhcdWI4NWNcdWM3NTggXHVhZTM4XHVjNzc0XHVhYzAwIDFcdWQwYWNcdWI4NWNcdWJiZjhcdWQxMzBcdWM3NzggSCAmdGltZXM7IFcgXHVhYzFjXHVjNzU4IFx1Yzc5MVx1Yzc0MCBcdWFkNmNcdWM1ZWRcdWI0ZTRcdWI4NWMgXHViMDk4XHViMjU4XHVjNWI0IFx1Yzc4OFx1YjJlNC4gXHViZDgxXHVjYWJkXHVjNzNjXHViODVjXHViZDgwXHVkMTMwIGkgXHViY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