#include <cstdio> #include <iostream> #include <cmath> using namespace std; int main(){ int H,W; while(1){ cin >> H >> W; if(H==0&&W==0)break; for(int h=0;h<H;h++){ if(h%2==0){ for(int w=0;w<W;w++){ if(w%2==0) cout << "#"; else cout << "."; if(w==W-1) cout << endl; } } else { for(int w=0;w<W;w++){ if(w%2==0) cout << "."; else cout << "#"; if(w==W-1) cout << endl; } } } cout << endl; } return 0; }
わりと前問コピペ感ある h*wの偶奇で処理できる気もするけど直感的だしこっちでいいや