The doubling game is closer to a puzzle than to a game. The board is a rectangle divided into unit square cells. At the start some cells hold one token each and the other cells are empty.
The goal is to pile up as many tokens as possible on a single cell. Only one kind of move is allowed. If two cells that share a side hold the same number of tokens and that number is at least 1, you can move every token of one cell onto the other cell.
Given the starting board, write a program that computes for each cell the largest number of tokens that can be gathered on that cell.
The first line has the number of rows n and the number of columns m of the board (1≤n,m≤200).
Each of the next n lines has a string of m digits, each digit 0 or 1. A 1 marks a cell with a token and a 0 marks an empty cell.
Print n lines with m integers each, separated by single spaces. The j-th number on the i-th line is the largest number of tokens that can be gathered on the cell in row i and column j, starting from the given board.
Every cell is counted separately and every cell starts from the same board. Making no move at all is allowed, so a cell that holds a token answers at least 1, and an empty cell answers 0.

The picture shows how 4 tokens are gathered on the cell in row 2, column 4 of the board in the first example. Move the token in row 1, column 3 onto column 4, which leaves 2 tokens in row 1, column 4. Move the token in row 2, column 3 onto column 4, which leaves 2 tokens in row 2, column 4. The two cells share a side and hold the same number of tokens, so move the 2 tokens of row 1, column 4 onto row 2, column 4 and get 4.