import scala.annotation.tailrec
import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
import scala.io.StdIn._
object Main extends App {

  solve()
  @tailrec def solve(): Unit = {
    val arg = readLine.trim
    if (arg == "#") return
    val state = arg.toState
    val Array(a, b, c, d) = readLine.trim.split(' ').map(_.toInt)
    state(a - 1)(b - 1) = false
    state(c - 1)(d - 1) = true
    println(state.toJfen)
    solve()
  }
  implicit class JfenExpression(val expression: String) extends AnyVal {
    def toState: Array[Array[Boolean]] = {
      val split = expression.split('/')
      val height = split.length
      val width = calWidth(split.head)
      val state = Array.fill(height){Array.fill(width){false}}
      for ((line, i) ← split.zipWithIndex) {
        var j = 0
        for (c ← line) {
          c match {
            case 'b' ⇒
              state(i)(j) = true
              j += 1
            case _ ⇒ j += c.asDigit
          }
        }
      }
      state
    }
    private[this] def calWidth(line: String): Int = {
      line.map{
        case 'b' ⇒ 1
        case c ⇒ c.asDigit
      }.sum
    }
  }
  implicit class State(val state: Array[Array[Boolean]]) extends AnyVal {
    def toJfen: String = {
      var result = Nil: List[String]
      for (line ← state) {
        var state = Nil: List[String]
        val indices = -1 +: line.indices.filter(i ⇒ line(i)) :+ line.length
        for (i ← indices.indices.tail) {
          state :::=  "b" :: (indices(i) - indices(i - 1) - 1).toString :: Nil
        }
        result ::= state.tail.reverse.filter(_ != "0").mkString
      }
      result.reverse.mkString("/")
    }
  }
}
