시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 89 20 18 29.032%

문제

최근에 고고학자들이 그리스-로마 건축을 발견했다. 이 장소는 R*C칸으로 모델링 되어 있다. 고고학자들은 각 칸에 빌딩이 있었는지 없었는지를 표시해 두었다.

고고학자들은 이 장소에 서로 다른 시대에 지어진 두 건물이 있었다는 사실을 알게되었다. 또, 두 건물의 바닥 모양은 정사각형이었다.

두 건물이 서로 다른 시대에 지어졌기 때문에, 바닥이 겹칠 수도 있다. 이 때, 가능한 위치와 크기를 구하는 프로그램을 작성하시오. 

입력

첫째 줄에 발견한 장소의 크기인 R과 C가 주어진다. (1 ≤ R ≤ 100, 1 ≤ C ≤ 100)

다음 R개의 줄에는 C개의 문자가 주어진다. 각 문자는 '.' 또는 'x'이고, '.'인 경우에는 그 칸에 건물의 흔적이 없었다는 뜻이고, 'x'는 건물이 있었다는 뜻이다.

출력

두 건물의 바닥의 왼쪽 위 좌표와 크기를 출력한다. 항상 답이 존재하는 경우만 주어진다.

예제 입력 1

3 3
xx.
xxx
...

예제 출력 1

1 1 2
2 3 1
W3sicHJvYmxlbV9pZCI6IjI5NjciLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWFkZjhcdWI5YWNcdWMyYTQtXHViODVjXHViOWM4IFx1YWM3NFx1Y2Q5NSIsImRlc2NyaXB0aW9uIjoiXHJcbjxwPlxyXG5cdFx1Y2Q1Y1x1YWRmY1x1YzVkMCBcdWFjZTBcdWFjZTBcdWQ1NTlcdWM3OTBcdWI0ZTRcdWM3NzQgXHVhZGY4XHViOWFjXHVjMmE0LVx1Yjg1Y1x1YjljOCBcdWFjNzRcdWNkOTVcdWM3NDQgXHViYzFjXHVhY2FjXHVkNTg4XHViMmU0LiBcdWM3NzQgXHVjN2E1XHVjMThjXHViMjk0IFIqQ1x1Y2U3OFx1YzczY1x1Yjg1YyBcdWJhYThcdWIzNzhcdWI5YzEgXHViNDE4XHVjNWI0IFx1Yzc4OFx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