import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while (scan.hasNext()) { String str = scan.nextLine(); char[] chrs = str.toCharArray(); process(chrs, str); } } ...