The famous thief―Kid has encountered a problem when he wanted to steal a diamond ring. He would get the important password after solving that problem. However, he has tried his best to solve the problem, but failed. Kid needs help with that problem, could you help him, or you won’t, as he is a thief?

### 输入格式

However, the problem was like this: Give you a rectangle with m*n letters (0<m, n<=100) and 6 different words, you should find out how many times each word has appeared in that rectangle. The matching can be done in any of the eight directions either horizontally, vertically or diagonally through the grid. Upper and lower case of the same letter are considered same. Words start with different points should be considered different.

### 样例

Input
8 11
abcDEFGhigg
hEbkWalDork
FtyAwaldORm
FtsimrLqsrc
byoArBeDeyv
Klcbqwikomk
yUiqlxcnBjf
Abcd
Waldorf
Bambi
STR
Betty
Dagbert

Output
1 1 1 1 1 1


13 人解决，27 人已尝试。

18 份提交通过，共有 66 份提交。

6.4 EMB 奖励。