There are multiple test cases, terminated by a line "0 0".
For each test case, the first line contains two integers n,m(1<=n,m<=10).
In following n lines, each line contains a string consisting of m characters, representing the initial state(0 means off, 1 means on).