#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  int i, n, m;
  cin >> n >> m;
  s1.insert(0, m, '#');
  s2.insert(0, m - 1, '.');
  s2.push_back('#');
  bool ok = 1;
  for (; n > 0; n--) {
    if (n % 2) {
      cout << s1 << endl;
    } else {
      if (ok) {
        cout << s2 << endl;
        ok = 0;
      } else {
        for (i = m - 1; i >= 0; i--) cout << s2[i];
        cout << endl;
        ok = 1;
      }
    }
  }
  return 0;
}
