#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cout << "#";
  }
  cout << endl;
  for (int i = 0; i < (n - 1) / 2; i++) {
    if (i % 2 != 0) {
      cout << "#";
    }
    for (int j = 0; j < m - 1; j++) {
      cout << ".";
    }
    if (i % 2 == 0) {
      cout << "#";
    }
    cout << endl;
    for (int j = 0; j < m; j++) {
      cout << "#";
    }
    cout << endl;
  }
  return 0;
}
