An ancient rune tablet is a grid of lowercase letters with R rows and C columns. A word can be traced on the tablet if it is possible to start at some cell and repeatedly step to a horizontally or vertically adjacent cell so that the visited cells, in order, spell the word. No cell may be used more than once within a single trace.
Determine whether the given target word can be traced on the tablet.
Input format
Line 1: two integers R and C.
Next R lines: each a string of exactly C lowercase letters (one grid row).
Last line: the target word (lowercase letters).
Output format
Print YES if the word can be traced, otherwise NO.
Constraints
- 1 <= R, C <= 5
- 1 <= length of the target word <= 8
- All letters are lowercase English letters.