Diamonds joker
All your answers will be questioned
"Interstande 60"
We have a map of Arseny. And no one, and as many as 54. What is missing is Jack joker. (Of course, you do not know why you need diamonds joker?) But it has a rectangular sheet of paper from a notebook, from which you can cut this joker.
Each cell of the leaf is painted in one of 26 colors, and the joker should provide a rhombus consisting of cells of one color (not necessarily red, black, or, say, blue diamonds joker no one will confuse).
In this task, with a diamond center in the cell (r_0, c_0) (r - the row number, c - the column number) of radius R is the set of cells (r_i, c_i), satisfying |r_i-r_0|+|c_i-c_0|≤R.
Of course, more useful than a joker in the game, so it wants to cut Arseny of the paper's largest diamond, which consists of cells of the same color. Write a program that will help with him.
Input
The first line of the input file contains two numbers separated by a space m and n (1 ≤ m, n ≤ 500) - the size of the rectangle (in cells). Each of the following m lines contains n capital letters, each letter corresponds to a particular color. The second line in the input file corresponds to the first side, (m+1)-th row corresponds to the m-th row of the rectangle.
Output
Output to output three numbers r_0, c_0 and R in terms of space - the line number and column number of the center and radius of the largest size diamond. If there are a few diamonds, diamond output with the smallest line number. In case of ambiguity, diamond output with the smallest number of the column.
The derived numbers must also satisfy the inequalities:
1 + R ≤ r_0 ≤ m - R, 1 + R ≤ c_0 ≤ n - R,
that is a diamond for the joker must lie entirely in the rectangle.