#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <climits>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define DEBUG 1
using namespace std;
constexpr int kMod = 1000000007;
typedef long long LL;

int main() {
  int A, B; cin >> A >> B;
  vector<string> C(100);
  for (int i = 0; i < 50; ++i) {
    C[i] = string(100, '.'); // White
  }
  for (int i = 50; i < 100; ++i) {
    C[i] = string(100, '#'); // Black
  }

  --A, --B;

  for (int i = 0; i < 50 && B > 0; i += 2) {
    for (int j = 0; j < 100 && B > 0; j += 2) {
      C[i][j] = '#'; --B;
    }
  }
  for (int i = 99; i > 50 && A > 0; i -= 2) {
    for (int j = 0; j < 100 && A > 0; j += 2) {
      C[i][j] = '.'; --A;
    }
  }

  cout << 100 << " " << 100 << endl;
  for (auto s : C) cout << s << endl;
}

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>

using namespace std;

int main(void) {
    int A, B;
    cin >> A >> B;
    cout << 100 << " " << 100 << endl;
    vector< vector<int> > grad(100, vector<int>(100));
    for(int i=0; i<50; i+=2) {
        for(int j=0; j<100; j+=2) {
            if(A > 1) {
                grad[i][j] = 1;
                --A;
            }
        }
    }
    for(int i=50; i<100; i++) {
        for(int j=0; j<100; j++) {
            grad[i][j] = 1;
            if(B > 1 && i>50 && i%2 == 1 && j%2) {
                grad[i][j] = 0;
                --B;
            }
        }
    }
    for(int i=0; i<100; i++) {
        for(int j=0; j<100; j++) {
            if(grad[i][j]) {
                cout << '.';
            } else {
                cout << '#';
            }
        }
        cout << endl;
    }
    return 0;
}
