#include <bits/stdc++.h>
using namespace std;
void lines(int n, int l = 2) {
  char first = '#', last = '#', mid = '#';
  if (l == 1) last = mid = '.';
  if (l == 3) first = mid = '.';
  cout << first;
  for (int i = 1; i < n - 1; i++) cout << mid;
  cout << last << endl;
}
int main() {
  int n, m, i, j, dir = 0;
  cin >> n >> m;
  for (i = 0; i < n; i++) {
    if (i % 2 == 0)
      lines(m);
    else {
      if (dir == 0) {
        lines(m, 3);
        dir = 1;
      } else {
        lines(m, 1);
        dir = 0;
      }
    }
  }
  return 0;
}
