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