You are given an H × W grid represented by H strings, ( S_1, S_2, \ldots, S_H ). Each string corresponds to a row of the grid, where:
The j-th character in the string ( S_i ) indicates the square at the i-th row (from the top) and j-th column (from the left).
A . represents an empty square.
A # represents a square containing a bomb.
Dolphin wants to find out how many bomb squares are adjacent to each empty square in the grid. For the purposes of this problem, "adjacent" includes squares that are horizontally, vertically, or diagonally adjacent. Therefore, each square can have at most eight adjacent squares.
Your task is to replace each . in the grid with a digit that represents the number of bomb squares adjacent to that empty square.
Input Format
The first line contains two integers, ( H ) (1 ≤ ( H ) ≤ 100) and ( W ) (1 ≤ ( W ) ≤ 100), representing the height and width of the grid respectively.
The next ( H ) lines each contain a string ( S_i ) (where ( |S_i| = W )), consisting of characters . and #.
Output Format
Print ( H ) lines, where each line represents the modified grid. Each . should be replaced by a digit indicating the count of adjacent bomb squares, and # should remain unchanged.
Examples
Input
text
3 4
..#.
#..#
..#.
Output
text
11#1
#32#
11#1
Explanation
For the first cell (0,0) in the input, it is adjacent to bomb squares in positions (0,2) and (1,1), so it is replaced by 1.
The same logic applies to the rest of the empty squares.