#include <iostream>
using namespace std;
int main()
{
int n,m; cin >> n >> m; char c[n][m]; bool First = true ,Second = false;
for(int i = 0 ; i < n ; i++){
for(int j = 0 ; j < m ; j++){
if(i%2 != 0 && First ){
c[i][m-1] = '#';
}
else if(i%2 != 0 && Second){
c[i][0] = '#';
}
else c[i][j] = '#';
}
if(i%2 != 0 && First ){
First = false ; Second = true;
}
else if(i%2 != 0 && Second){
First = true ; Second = false;
}
}
for(int i = 0 ; i < n ; i++){
for(int j = 0 ; j < m ; j++){
if(c[i][j]=='#') cout <<'#';
else cout<<'.';
}
cout << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewogICAgaW50IG4sbTsgY2luID4+IG4gPj4gbTsgY2hhciBjW25dW21dOyBib29sIEZpcnN0ID0gdHJ1ZSAsU2Vjb25kID0gZmFsc2U7CgogICAgZm9yKGludCBpID0gMCA7IGkgPCBuIDsgaSsrKXsKICAgICAgICBmb3IoaW50IGogPSAwIDsgaiA8IG0gOyBqKyspewogICAgICAgICAgICAgICAgaWYoaSUyICE9IDAgJiYgRmlyc3QgKXsKICAgICAgICAgICAgICAgICAgICAgICAgY1tpXVttLTFdID0gJyMnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZihpJTIgIT0gMCAmJiBTZWNvbmQpewogICAgICAgICAgICAgICAgICAgIGNbaV1bMF0gPSAnIyc7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGNbaV1bal0gPSAnIyc7CiAgICAgICAgfQogICAgICAgIGlmKGklMiAhPSAwICYmIEZpcnN0ICl7CiAgICAgICAgICAgIEZpcnN0ID0gZmFsc2UgOyBTZWNvbmQgPSB0cnVlOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmKGklMiAhPSAwICYmIFNlY29uZCl7CiAgICAgICAgICAgIEZpcnN0ID0gdHJ1ZSA7IFNlY29uZCA9IGZhbHNlOwogICAgICAgIH0KICAgIH0KICAgIGZvcihpbnQgaSA9IDAgOyBpIDwgbiA7IGkrKyl7CiAgICAgICAgZm9yKGludCBqID0gMCA7IGogPCBtIDsgaisrKXsKCiAgICAgICAgICAgIGlmKGNbaV1bal09PScjJykgY291dCA8PCcjJzsKICAgICAgICAgICAgZWxzZSBjb3V0PDwnLic7CiAgICAgICAgfQogICAgICAgIGNvdXQgPDwgZW5kbDsKICAgIH0KICAgIHJldHVybiAwOwp9