#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
  int a, b;
  cin >> a >> b;
  vector<string> grid(100, string(100, '.'));
  for (int i = 0; i < 50; i++) {
    grid[i] = string(100, '#');
  }
  int h = 0, w = 0;
  for (int i = 0; i < a - 1; i++) {
    grid[h][w] = '.';
    if (w == 98) {
      w = 0;
      h += 2;
    } else {
      w += 2;
    }
  }
  h = 51;
  w = 0;
  for (int i = 0; i < b - 1; i++) {
    grid[h][w] = '#';
    if (w == 98) {
      w = 0;
      h += 2;
    } else {
      w += 2;
    }
  }
  cout << 100 << " " << 100 << endl;
  for (int i = 0; i < 100; i++) {
    cout << grid[i] << endl;
  }
}
