var l = Array(String(readLine()!)).sorted(by: >) var n = 0 var s = Set(l) if s.count < 2 || (s.count == 2 && l.contains("0")){ print(-1) }else{ let m = Int(l.map{String($0)}.joined())! for i in [Int](1..