object Main extends App {
  def calc(i: Int, c: Char, j: Int): Int = if (c == '+') i + j else i - j

  def duplicatePermutation[A](list: List[A], length: Int): List[List[A]] = {
    if (length == 1) {
      list.map(List(_))
    } else {
      list.flatMap(x => duplicatePermutation(list, length - 1).map(y => x :: y))
    }
  }

  val sc = new java.util.Scanner(System.in)
  val Array(a, b, c, d) = sc.next().toCharArray.map(_.toString)
  duplicatePermutation(List('+', '-'), 3).collectFirst {
    case Seq(ab, bc, cd) if calc(calc(calc(a.toInt, ab, b.toInt), bc, c.toInt), cd, d.toInt) == 7 =>
      Array(a, ab.toString, b, bc.toString, c, cd.toString, d, "=", "7").mkString
  }.foreach(println)
}
