object Main extends App {
  val sc = new java.util.Scanner(System.in)
  var a, b = sc.nextInt() - 1
  val n = 100

  val ans = Array.fill(n)("")
  var i = 0

  ans(i) = "." * n
  i += 1

  while (b > 0) {
    val x = b.min(n/2)
    ans(i) = s"${"#." * x}${".." * (n/2 - x)}"
    ans(i+1) = "." * n
    i += 2
    b = b - x
  }

  ans(i) = "#" * n
  i += 1

  while (a > 0) {
    val x = a.min(n/2)
    ans(i) = s"${"#." * x}${"##" * (n/2 - x)}"
    ans(i+1) = "#" * n
    i += 2
    a = a - x
  }

  for (j <- i until n) {
    ans(j) = "#" * n
  }

  println("100 100")
  println(ans.mkString("\n"))
}