You are given an n x n grid of lowercase English letters. Your task is to determine whether there is a simple path in this grid that can be read as the given string s.
The letters in the path must form the string s when read in order.
Input
The first line contains an integer n (1 ≤ n ≤ 6), representing the size of the grid.
The next n lines contain n lowercase English letters each, representing the letters in each cell of the grid.
The last line contains a string s (1 ≤ |s| ≤ 15), consisting of lowercase English letters.
Output
Print YES if there is a simple path in the grid that forms the string s when read in order. Otherwise, print NO.