fork download
  1. for _ in range(int(input())):
  2. n=int(input())
  3. hashs="##.."
  4. for i in range(n):
  5. print(hashs*(n//2),end='')
  6. if n%2!=0:
  7. print(hashs[:2])
  8. else:
  9. print()
  10. print(hashs*(n//2),end='')
  11. if n%2!=0:
  12. print(hashs[:2])
  13. else:
  14. print()
  15. hashs=hashs[::-1]
  16.  
Success #stdin #stdout 0.03s 9824KB
stdin
1
4
stdout
##..##..
##..##..
..##..##
..##..##
##..##..
##..##..
..##..##
..##..##