#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)

template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}

template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

const int inf = 1000000007;
const int MOD = 1000000007;
const long long INF = 1000000000000000007;

// -------------------------------------------------------

int A, B;

int main() {
  cin >> A >> B;

  int cnt_w = 1, cnt_b = 1;
  cout << 100 << " " << 100 << "\n";
  rep(h, 0, 50) {
    rep(w, 0, 100) {
      if (h % 2 == 0 && w % 2 == 0) {
        if (cnt_b < B) {
          cout << '#';
          ++cnt_b;
        } else {
          cout << ".";
        }
      } else {
        cout << ".";
      }
      if (w == 99) {
        cout << "\n";
      }
    }
  }

  rep(h, 50, 100) {
    rep(w, 0, 100) {
      if (h % 2 == 1 && w % 2 == 0) {
        if (cnt_w < A) {
          cout << '.';
          ++cnt_w;
        } else {
          cout << '#';
        }
      } else {
        cout << '#';
      }
      if (w == 99) {
        cout << "\n";
      }
    }
  }
}

#pragma region
#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <list>
#include <iomanip>
#include <cstdint>
#include <bitset>

using namespace std;
typedef long long ll;
//#define rep(i, s, e) for (int(i) = (s); (i) < (e); ++(i))
#define rep(i, e) for (int(i) = 0; (i) < (e); ++(i))
#define rrep(i, s) for (int(i) = (s) - 1; (i) >= 0; --(i))
#define all(x) x.begin(),x.end()

#pragma region UnionFind
struct UnionFind
{
	vector<int> par;

	UnionFind(int n) : par(n, -1) {}
	void init(int n) { par.assign(n, -1); }

	int root(int x)
	{
		if (par[x] < 0) return x;
		else return par[x] = root(par[x]);
	}

	bool issame(int x, int y)
	{
		return root(x) == root(y);
	}

	bool merge(int x, int y)
	{
		x = root(x); y = root(y);
		if (x == y) return false;
		if (par[x] > par[y]) swap(x, y);
		par[x] += par[y];
		par[y] = x;
		return true;
	}

	int size(int x)
	{
		return -par[root(x)];
	}
};
#pragma endregion
#pragma region GCD
int gcd(int a, int b)
{
	if (a%b == 0)return b;
	return gcd(b, a%b);
}
#pragma endregion
#pragma region chmin
template<class T> inline bool chmin(T& a, T b)
{
	if (a > b)
	{
		a = b;
		return true;
	}
	return false;
}
#pragma endregion
#pragma region chmax
template<class T> inline bool chmax(T& a, T b)
{
	if (a < b)
	{
		a = b;
		return true;
	}
	return false;
}
#pragma endregion
#pragma endregion


int main()
{
	int a, b; cin >> a >> b;
	vector<string> res;
	rep(i, 50)
	{
		string s = "";
		rep(j, 100)s += '.';
		res.push_back(s);
	}
	rep(i, 50)
	{
		string s = "";
		rep(j, 100)s += '#';
		res.push_back(s);
	}
	int x = 0;
	int y = 0;
	--a, --b;
	while (b > 0)
	{
		if (y >= 100)
		{
			x += 2;
			y = 0;
		}
		res[x][y] = '#';
		y += 2;
		--b;
	}
	x = 51;
	y = 0;
	while (a > 0)
	{
		if (y >= 100)
		{
			x += 2;
			y = 0;
		}
		res[x][y] = '.';
		y += 2;
		--a;
	}
	cout << 100 << " " << 100 << endl;
	rep(i, 100)cout << res[i] << endl;
}