import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.random;

int a, b;
enum N = 100;
//Random gen;
Mt19937 gen;

struct Solve {
  int [N][N] c;
  bool [N][N] v;
  int [2] n;
  int X, Y;
  void f (int x, int y, int color) {
    if (v[x][y] || color != c[x][y]) {
      return;
    }
    v[x][y] = true;
    if (x > 0) {
      f (x - 1, y, color);
    }
    if (x + 1 < X) {
      f (x + 1, y, color);
    }
    if (y > 0) {
      f (x, y - 1, color);
    }
    if (y + 1 < Y) {
      f (x, y +1, color);
    }
  }
  void g () {
    foreach (i; 0 .. X) {
      foreach (j; 0 .. Y) {
        v[i][j] = false;
      }
    }
    n[] = 0;
    foreach (i; 0 .. X) {
      foreach (j; 0 .. Y) {
        if (!v[i][j]) {
          n[c[i][j]]++;
          f (i, j, c[i][j]);
        }
      }
    }
  }
  void rnd () {
    foreach (i; 0 .. N) {
      foreach (j; 0 .. N) {
        c[i][j] = uniform (0, 2, gen);
      }
    }
    X = 10;
    Y = 10;
  }
  void print () {
    writeln (X, ' ', Y);
    foreach (i; 0 .. X) {
      foreach (j; 0 .. Y) {
        write (c[i][j] == 0 ? "." : "#");
      }
      writeln ();
    }
  }
  int fit () {
    g ();
    return  (a - n[0]) * (a - n[0]) + (b - n[1]) * (b - n[1]);
  }
}

bool test (Solve s) {
  s.rnd ();
  int cur = s.fit ();
  int f = 0;
  while (cur > 0) {
    int x = uniform (0, N, gen);
    int y = uniform (0, N, gen);
    int OX = s.X;
    int OY = s.Y;
    s.X = uniform (max (2, s.X - 1), min (N, s.X + 1) + 1);
    s.Y = uniform (max (2, s.Y - 1), min (N, s.Y + 1) + 1);
    int next = s.fit ();
    if (next < cur) {
      cur = next;
      debug {stderr.writeln (cur); }
    } else {
      s.c[x][y] ^= 1;
      s.X = OX;
      s.Y = OY;
      if (++f >= 10000) { return false; }
    }
  }
  return true;
}

void main() {
  gen.seed (1);
  readf (" %d %d", &a, &b);
  auto s = Solve ();
  while (!test (s)) {
  
  }
  s.print ();
}

