You are given an n*m grid which contains lower case English letters. How many times does the phrase "saba" appear horizontally, vertically, and diagonally in the grid?
Input format
Output format
Print the number of times the word “saba” appears in the grid.
The phrase "saba" must look one of thease shapes :
s | |||
a | |||
b | |||
a |
s | a | b | a |
s | |||
a | |||
b | |||
a |
a | |||
b | |||
a | |||
s |