HARISH_PUZZLE  Harish and his rooks puzzle
Harish is playing Eight Rooks Puzzle. In this puzzle, he must put exactly eight rooks onto an 8x8 chessboard. No two rooks must be in the same row, and no two rooks must be in the same column.
You are given a 8 x 8 board. The jth column of the ith row of board is either 'R' or '.'. If this is 'R', the cell in row i, column j contains a rook. Otherwise the cell doesn't contain a rook. Determine whether Harish solved the puzzle correctly. If he solved the puzzle correctly, print "YES". Otherwise print "NO".
Input
T Number of test cases
Each test case contains a 8 X 8 character array indicating the chess board.
Each character in board will be either 'R' or '.'
Output
YES or NO indicating whether he has solved the puzzle.
Example
Input:
2
R.......
.R......
..R.....
...R....
....R...
.....R..
......R.
.......R
......R.
....R...
...R....
.R......
R.......
.......R
..R.....
.......R
Output:
YES
NO
hide comments
aadarsh45:
20190217 20:25:10
simple but do with carefully . Last edit: 20190217 20:25:38 

shadan_amir1:
20190109 22:46:38
For c and c++, ASCII code for enter and space is the key!


nadstratosfer:
20170819 21:30:23
Make sure you ignore the blanklines in input when solving with Python. 

drodumbell:
20170430 16:33:28
AC in one GO. EZ 

hanstan:
20170218 10:36:50
Really simple one XD. Ac in 1 go... 

holmesherlock:
20170211 20:40:15
really simple but only if you avoid silly mistakes,, 

ks1999:
20170127 18:29:18
is it possible to get AC?


vengatesh15:
20170124 19:08:52
simple problem.. AC in 1 go :) 
Added by:  gohan 
Date:  20160219 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 MAWK BC COFFEE DART FORTH GOSU JSMONKEY KTLN OCT PROLOG R RACKET SQLITE SWIFT UNLAMBDA 