import java.io.*; public class JC { public static final int SIZE = 1000; public static boolean [] commas = new boolean[SIZE]; public static int lastComma, lastSize; public static void main(String args[]) { int size; int [] a = new int[SIZE]; boolean [] comma = new boolean[SIZE]; char ch; BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String line =""; while (true) { try { line = in.readLine(); } catch (Exception e) {}; size = line.length(); for(int i=0; i end-start+1) return false; if (prevend-prev < end-start+1) return true; for(int i=start; i<=end; i++) { if (a[i] > a[i-start+prev]) return true; else if (a[i] < a[i-start+prev]) return false; } return false; } public static boolean greaterequal(int start1, int end1, int start2, int end2, int a[]) { boolean iszero1 = false, iszero2 = false; while (start1 < end1-1 && a[start1] == 0) start1++; if (start1 == end1-1 && a[start1] == 0) iszero1 = true; while (start2 < end2-1 && a[start2] == 0) start2++; if (start2 == end2-1 && a[start2] == 0) iszero2 = true; if (end1-start1 > end2-start2) return true; if (end1-start1 < end2-start2) return true; for(int i=start1; i a[i-start1+start2]) return true; else if (a[i] < a[i-start1+start2]) return false; } return true; } public static void findseries(int start, int[] a, int size, int prev, boolean [] comma) { if (start == size) { if (greaterequal(prev, size, lastComma, size, a)) { for(int i=0; i