Some cells of NSIT are similar to each other, and some look very different. Swaroop
enjoys taking photographs and at every step he takes a photograph of the cell where
he is currently present. The path through the NSIT is considered to be convenient
if photographs taken on his way, can be viewed in both forward and in reverse
order, showing the same sequence of photos. More formally, the line formed by the
cells in order of visiting should be a palindrome.
Count the number of convenient paths from cell (1, 1) to cell (a, b). Since this
number can be very large, determine the remainder after dividing it by 10^9 + 7.
Input Format :
The first line contains two integers a, b (1 ≤ a, b ≤ 500) — the height and width
of NSIT.
Each of the following n lines contains b lowercase English letters identifying the
types of cells of the forest. Identical cells are represented by identical letters,
different cells are represented by different letters.
Constraints:
1<=a,b<=500
Output Format:
Sample Input:
3 4
aaab
baaa
abba
Sample Output:
4
0