Example with solution
4
3
4
5
6
5
S
3
2
3
4
5
4
E
2
1
2
3
4
3
H
3
2
1
2
3
2
S
4
3
2
1
2
1
A
5
4
3
2
1
0
(empty)
A
H
S
A
Z
(empty)
zasha__
_ash_es