fun main(args: Array<String>) {
  val (wCount, bCount) = readLine()!!.split(" ").map(String::toInt)
  var wRemaining = wCount - 1
  var bRemaining = bCount - 1
  
  println("98 99")
  
  for (y in 0 until 49) {
    if (y % 2 == 0) {
      println(String(CharArray(99, { '#' })))
    } else {
      val chars = CharArray(99, { '#' })
      for (x in 0 until 99) {
        if (x % 2 == 1) {
          if (wRemaining > 0) {
            chars[x] = '.'
            wRemaining--
          }
        }
      }
      println(String(chars))
    }
  }

  for (y in 0 until 49) {
    if (y % 2 == 0) {
      println(String(CharArray(99, { '.' })))
    } else {
      val chars = CharArray(99, { '.' })
      for (x in 0 until 99) {
        if (x % 2 == 1) {
          if (bRemaining > 0) {
            chars[x] = '#'
            bRemaining--
          }
        }
      }
      println(String(chars))
    }
  }
}