File Edit Options Buffers Tools C Help
#include<stdio.h>

int main(void) {
        char line[10];
        int H,W;
        int i,j;
        int sharpFirst = 0;

        while ( ( fgets(line, sizeof(line), stdin) ) ) {
                sscanf(line, "%d %d", &H, &W);

                for ( i = 1; i <= W; i++ ) {
                        for ( j = 1; j <= H; j++ ) {
                                if ( (i % 2) == (j % 2) )  printf("#");
                                else printf(".");
                        }
                        printf("\n");
                }
                printf("\n");

        }

}