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

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

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