TLE, need optimize.
stil TLE

Submission Result: Time Limit Exceeded

Last executed input:	["53..7....","6..195...",".98....6.","8...6...3","4..8.3..1","7...2...6",".6....28.","...419..5","....8..79"]
Submission Result: Wrong Answer
Input:	[1]
Output:	0
Expected:	1

so weird