import scala.io.StdIn.readLine @main def yuki39(): Unit = val s = readLine val t = s.toCharArray val n = s.length var ans: Int = s.toInt var temp = t(0) for i <- 0 until n j <- i + 1 until n do temp = t(i) t(i) = t(j) t(j) = temp ans = Math.max(ans, t.mkString.toInt) temp = t(i) t(i) = t(j) t(j) = temp println(ans)