import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); if(s.chars().distinct().filter(i -> i-48 != 0).count() < 2) { System.out.println("-1"); return; } char[] chars = s.toCharArray(); Arrays.sort(chars); StringBuilder sb = new StringBuilder(); for (int i=0;i