// Original C++ solution (slower):
# include <bits/stdc++.h>



using namespace std;



const int N = 101;





int a, b, u[N][N], v[N][N], n = 70, m = 70;

bool flag;



void dfs(int x, int y){

      v[x][y] = 1;

      if(u[x][y + 1] == u[x][y] && !v[x][y + 1] && y + 1 <= m)

            dfs(x, y + 1);

      if(u[x][y - 1] == u[x][y] && !v[x][y - 1] && y - 1 >= 1)

            dfs(x, y - 1);

      if(u[x + 1][y] == u[x][y] && !v[x + 1][y] && x + 1 <= n)

            dfs(x + 1, y);

      if(u[x - 1][y] == u[x][y] && !v[x - 1][y] && x - 1 >= 1)

            dfs(x - 1, y);

}



int main(){

      cin >> a >> b;

      a --, b --;

      int x = 1, y = 1;



      while(a > 0){

            u[x][y] = 1;

            a --;

            y += 2;

            if(y > m){

                  x += 2;

                  y = 1;

            }

      }



      for(int i = n / 2; i <= n; i ++)

            for(int j = 1; j <= m; j ++)

                  u[i][j] = 1;



      x = n, y = m;

      while(b > 0){

            u[x][y] = 0;

            b --;

            y -= 2;

            if(y <= 0){

                  y = m;

                  x -= 2;

            }

      }



      int cnt = 0, cn = 0;



      for(int i = 1; i <= n; i ++){

            for(int j = 1; j <= m; j ++){

                  if(v[i][j] == 0 && u[i][j] == 1){

                        dfs(i, j), cnt ++;

                  }

            }

      }



      for(int i = 1; i <= n; i ++){

            for(int j = 1; j <= m; j ++){

                  if(v[i][j] == 0 && u[i][j] == 0){

                        flag = 1;

                        dfs(i, j), cn ++;

                        flag = 0;

                  }

            }

      }



//      cout << cnt << " " << cn << endl;

      cout << n << " " << m << endl;



      for(int i = 1; i <= n; i ++){

            for(int j = 1; j <= m; j ++)

                  if(u[i][j])

                        cout << '.';

                  else

                        cout << '#';

            cout << endl;

      }

}


// Optimized solution to the same problem (faster):
/*****************

 *   I<3   C++   *

 *  IWANT ANYAC  *

 * ILOVEPROGRAM! *

 *IT'SINTERESTING*

 * ILOVEPROGRAM! *

 *  INCONTESTS   *

 *   GETSCORE    *

 *    ACCODE     *

 *     LETS      *

 *      GO       *

 *Written by:    *

 *    charlieyan *

 *****************/

#include <assert.h>

#include <ctype.h>

#include <errno.h>

#include <float.h>

#include <fstream>

#include <iomanip>

#include <iostream>

#include <limits>

#include <locale>

#include <math.h>

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <time.h>

#include <wchar.h>

#include <wctype.h>

#include <algorithm>

#include <bitset>

#include <cctype>

#include <cerrno>

#include <clocale>

#include <cmath>

#include <complex>

#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <ctime>

#include <deque>

#include <exception>

#include <fstream>

#include <functional>

#include <limits>

#include <map>

#include <iomanip>

#include <ios>

#include <iosfwd>

#include <istream>

#include <ostream>

#include <queue>

#include <set>

#include <sstream>

#include <stack>

#include <stdexcept>

#include <streambuf>

#include <string>

#include <utility>

#include <vector>

#include <cwchar>

#include <cwctype>

#include <complex.h>

#include <fenv.h>

#include <inttypes.h>

#include <stdbool.h>

#include <stdint.h>

#include <tgmath.h>

#include <numeric>

#include <list>

#define LL long long

#define pb push_back

#define pob pop_back

#define mp make_pair

#define FILL(a,v) memset((void*)a,v,sizeof(a))

#define FILL0(a) FILL(a,0)

#define FILL1(a) FILL(a,-1)

#define FILLBIG(a) FILL(a,0x7f)

#define ALL(a) (a).begin(),(a).end()

#define Inf ((int)0x7f7f7f7f)

#define INF ((long long)0x7f7f7f7f7f7f7f7f)

#define Mod 1000000007

#define foreach(it,x) for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)

#define FOR(i,x) for(int i=0;i<x;i++)

#define RFOR(i,x) for(int i=x-1;i>=0;i--)

#define FFOR(i,a,b) for(int i=a;i<b;i++)

#define FRFOR(i,a,b) for(int i=a-1;i>=b;i--)

#define SZ(a) ((int)(a).size())

#define FI first

#define SE second

#define OVER(a) return puts(a),0

#define fastio ios::sync_with_stdio(0)

#define filei(f) freopen(f,"r",stdin)

#define fileo(f) freopen(f,"w",stdout)

#define eprintf(...) fprintf(stderr,__VA_ARGS__)

#define MASK(a) (1<<(a))

#define MASKX(x,a) ((x)<<(a))

#define BIT(a,b) ((a>>b)&1)

#define cddx(a) priority_queue<a >

#define cxdd(a) priority_queue<a,vector<a >,greater<a > >

#define deval(a) {cerr<<#a<<" = "<<a<<endl;}

#define dearr(be,en) {cerr<<#be;cerr<<" = {";for(auto i=be;i!=en;i++)cerr<<' '<<*i;cerr<<" }\n";}

#define reg register

#define prtime eprintf("\n\nTime used: %dms\n",clock());

#define PI 3.1415926535897932384626

//Xuzhen[The virus] is a BIG 13 !!!

using namespace std;

typedef pair<int,int> pii;

typedef unsigned long long UINT;

typedef unsigned int uint;

typedef long long INT;

typedef long double ldouble;

typedef pair<INT,INT> PII;

typedef stringstream sst;

typedef istringstream iss;

typedef vector<int> vint;

typedef vector<INT> VINT;

typedef vector<pii> vpii;

typedef vector<PII> VPII;

typedef priority_queue<int> pqi;

typedef priority_queue<INT> PQI;

typedef priority_queue<pii> pqp;

typedef priority_queue<PII> PQP;

typedef priority_queue<int,vint,greater<int> > xqi;

typedef priority_queue<INT,VINT,greater<INT> > XQI;

typedef priority_queue<pii,vpii,greater<pii> > xqp;

typedef priority_queue<PII,VPII,greater<PII> > XQP;



int n,m;

char a[107][107];



int main()

{

	cin>>n>>m;

	int cnt1=n-1,cnt2=m-1;

	for(int i=0;i<50;i++)

		for(int j=0;j<100;j++)a[i][j]='.';

	for(int i=50;i<100;i++)

		for(int j=0;j<100;j++)a[i][j]='#';

	for(int i=0;i<50;i++)

		for(int j=0;j<100;j++)

			if(i%2==0&&j%2==0&&cnt2)

			{

				cnt2--;

				a[i][j]='#';

			}

	for(int i=51;i<100;i++)

		for(int j=0;j<100;j++)

			if(i%2==0&&j%2==0&&cnt1)

			{

				cnt1--;

				a[i][j]='.';

			}

	cout<<"100 100"<<endl;

	for(int i=0;i<100;i++)cout<<a[i]<<endl;

	return 0;

}

// Fastest known solution for this problem: