#include<iostream>
using namespace std;

bool D[100][100];

int main() {
  int A, B; cin >> A >> B;
  for (int i = 0; i < 100; i++)
    for (int j = 0; j < 100; j++)
      D[i][j] = (i >= 50);
  for (int i = 0; i < A-1; i++) {
    D[i/50*2][i%50*2] = true;
  }
  for (int i = 0; i < B-1; i++) {
    D[99-i/50*2][i%50*2] = false;
  }
  cout << "100 100" << endl;
  for (int i = 0; i < 100; i++) {
    for (int j = 0; j < 100; j++)
      cout << (D[i][j] ? "." : "#");
    cout << endl;
  }
}