#include <bits/stdc++.h>
using namespace std;
int MAIN()
{
int n, m;
cin >> n >> m;
for(int i = 1; i <= n; i++)
{
for(int j = 1; j <= m; j++)
{
bool haveSnake = false;
if(i % 2 == 1) haveSnake = true;
else
{
if(i % 4 == 2) haveSnake = (j == m);
if(i % 4 == 0) haveSnake = (j == 1);
}
cout << (haveSnake ? "#" : ".");
}
cout << endl;
}
return 0;
}
int main()
{
#ifdef LOCAL_TEST
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif
ios :: sync_with_stdio(false);
cout << fixed << setprecision(16);
return MAIN();
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgTUFJTigpCnsKCWludCBuLCBtOwoJY2luID4+IG4gPj4gbTsKCWZvcihpbnQgaSA9IDE7IGkgPD0gbjsgaSsrKQoJewoJCWZvcihpbnQgaiA9IDE7IGogPD0gbTsgaisrKQoJCXsKCQkJYm9vbCBoYXZlU25ha2UgPSBmYWxzZTsKCQkJaWYoaSAlIDIgPT0gMSkgaGF2ZVNuYWtlID0gdHJ1ZTsKCQkJZWxzZQoJCQl7CgkJCQlpZihpICUgNCA9PSAyKSBoYXZlU25ha2UgPSAoaiA9PSBtKTsKCQkJCWlmKGkgJSA0ID09IDApIGhhdmVTbmFrZSA9IChqID09IDEpOwoJCQl9CgkJCWNvdXQgPDwgKGhhdmVTbmFrZSA/ICIjIiA6ICIuIik7CgkJfQoJCWNvdXQgPDwgZW5kbDsKCX0KCXJldHVybiAwOwp9CgppbnQgbWFpbigpCnsKCSNpZmRlZiBMT0NBTF9URVNUCgkJZnJlb3BlbigiaW4udHh0IiwgInIiLCBzdGRpbik7CgkJZnJlb3Blbigib3V0LnR4dCIsICJ3Iiwgc3Rkb3V0KTsKCSNlbmRpZgoJaW9zIDo6IHN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7Cgljb3V0IDw8IGZpeGVkIDw8IHNldHByZWNpc2lvbigxNik7CglyZXR1cm4gTUFJTigpOwp9Cg==