1390N.cpp 438 B

12345678910111213141516171819202122
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. int h, w, z = 0;
  5. while (cin >> h >> w) {
  6. if (h == 0 and w == 0)
  7. break;
  8. if (z++)
  9. cout << endl;
  10. for (int x = 0; x < h; x++) {
  11. for (int y = 0; y < w; y++) {
  12. if ((x + y) % 2 == 0)cout << "#";
  13. else cout << ".";
  14. }
  15. cout << endl;
  16. }
  17. }
  18. return 0;
  19. }