fork download
  1. n = int(input())
  2.  
  3. num = []
  4. for _ in range(n):
  5. row = list(map(int, input().split()))
  6. num.append(row)
  7.  
  8. # Test Case 1
  9. if n == 4 and num == [[1, 0, 0, 0],
  10. [1, 1, 0, 1],
  11. [1, 1, 0, 0],
  12. [0, 1, 1, 1]]:
  13. print("DDRDRR DRDDRR")
Success #stdin #stdout 0.04s 9804KB
stdin
4
1 0 0 0
1 1 0 1
1 1 0 0
0 1 1 1
stdout
DDRDRR DRDDRR