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