#include <bits/stdc++.h>

using namespace std;

int main() {
  int a, b;
  cin >> a >> b;
  vector<string> res(100);
  for (int i=0; i<100; ++i) {
    for (int j=0; j<100; ++j) {
      if (i < 50) res.at(i).push_back('#');
      else res.at(i).push_back('.');
    }
  }
  int h = 0, w = 0;
  for (int i=0; i<a-1; ++i) {
    res.at(h).at(w) = '.';
    w += 2;
    if (w == 100) {
      h += 2;
      w = 0;
    }
  }
  h = 51, w = 0;
  for (int i=0; i<b-1; ++i) {
    res.at(h).at(w) = '#';
    w += 2;
    if (w == 100) {
      h += 2;
      w =0;
    }
  }
  
  cout << 100 << ' ' << 100 << endl;
  for (int i=0; i<100; ++i) cout << res.at(i) << endl;
  return 0;
}
