Types: N: int, S: List[List[str]]  
Ranges: 1 ≤ N ≤ 300, S[i][j] is a lowercase English letter ('a' to 'z')  
Addtl Info: None  