import std.stdio,
       std.string,
       std.conv,
       std.algorithm;

void main() {
  int[] buf = readln.chomp.split.to!(int[]);
  int a = buf[0] - 1, b = buf[1] - 1;
  int K = 50;
  char[100][100] m;

  for (int i = 0; i < K; i++) {
    for (int j = 0; j < K * 2; j++) {
      m[i][j] = '#';
    }
  }

  for (int i = K; i < K * 2; i++) {
    for (int j = 0; j < K * 2; j++) {
      m[i][j] = '.';
    }
  }

  for (int i = 1; i < K - 1; i += 2) {
    for (int j = 1; j < K * 2; j += 2) {
      m[i][j] = '.';
      a--;
      if (a <= 0) break;
    }
    if (a <= 0) break;
  }

  for (int i = K + 1; i < K * 2; i += 2) {
    for (int j = 1; j < K * 2; j += 2) {
      m[i][j] = '#';
      b--;
      if (b <= 0) break;
    }
    if (b <= 0) break;
  }

  writeln("100 100");
  foreach(line; m) {
    writeln(line);
  }
}
