Problem: Oleg writes down the history of the days he lived. For each day he decides if it was good or bad. Oleg calls a non-empty sequence of days a zebra, if it starts with a bad day, ends with a bad day, and good and bad days are alternating in it. Let us denote bad days as 0 and good days as 1. Then, for example, sequences of days 0, 010, 01010 are zebras, while sequences 1, 0110, 0101 are not.

Oleg tells you the story of days he lived in chronological order in form of string consisting of 0 and 1. Now you are interested if it is possible to divide Oleg's life history into several subsequences, each of which is a zebra, and the way it can be done. Each day must belong to exactly one of the subsequences. For each of the subsequences, days forming it must be ordered chronologically. Note that subsequence does not have to be a group of consecutive days. 

Input

In the only line of input data there is a non-empty string s consisting of characters 0 and 1, which describes the history of Oleg's life. Its length (denoted as |s|) does not exceed 200 000 characters.

Output

If there is a way to divide history into zebra subsequences, in the first line of output you should print an integer k (1 ≤ k ≤ |s|), the resulting number of subsequences. In the i-th of following k lines first print the integer li (1 ≤ li ≤ |s|), which is the length of the i-th subsequence, and then li indices of days forming the subsequence. Indices must follow in ascending order. Days are numbered starting from 1. Each index from 1 to n must belong to exactly one subsequence. If there is no way to divide day history into zebra subsequences, print -1.

Subsequences may be printed in any order. If there are several solutions, you may print any of them. You do not have to minimize nor maximize the value of k.

Examples

Input

0010100


Output

3
3 1 3 4
3 2 5 6
1 7


Input

111


Output

-1

Solution (in JAVA):

Solution:
import java.awt.List;
			    		import java.io.*;
			import java.math.BigInteger;
			import java.util.*;

			    		
			    		
			    		/*
			    		 * 
			    		 * daiict
			    		 *
			    		 * 
			    		 * 
			    		 */
			    		
			    		
			    		public class pprac {
			    			 FastScanner in;
			    			 PrintWriter out;
			    		
			    			static ArrayList[] adj;
			    			static ArrayList[] aadj;
			    		    static int last;
			    			static int n;
			    			static int m;
			    			
			    			static int[] dp1;
			    			static int[] dp2;
			    			static int color[];
			    			static int visited[];
			    			static long[] arr;
			    			static long[] brr;
			    			static double ans;
			    			static int array[];
			    			static int start[];
			    			static int finish[];
			    			static int pref[];
			    			static int tree[];
			    			static int maxval = 32;
			    		
			    			static int ttt[];
			    			static int sum = 0;
			    			static String s;
			    		
			    			static int cc = 0;
			    			static long min = Long.MAX_VALUE;
			    			
			    			static ArrayList<Integer> segt[];
			    			
			    		//for dfs do not delete
			    			static int dir[][] ={{1,0},{0,1},{0,-1},{-1,0}};
			    			
			    		
			    			static int[] seg;
			    			static long count = 1;
			    			static long mod = (long)1e9 + 7;
			    	
			    			static int parent[];
			    			static int size[];
			    			
			    		    static int[] l;
			    		    static int[] r;
			    		    static int[] next;
			    		    static int[] cnt;
			    		    static int[] block;
			    		    
			    		    static int bblock = 1001;
			    		    
			    			static HashSet<String> set;
			    			static HashSet<String> set2;
			    			
			    			static int low[];
			    			static int disc[];
			    			static int time;
			    			static int acn[];
			    			
			    			static HashMap<Long,Integer> map;
			    			
			    			static class Pair implements Comparable<Pair>
			    		    {
			    				int x;int y;int i;
			    				
			    		        Pair(int l, int m,int i) {
			    		          
			    		        	this.x = l;
			    		            this.y = m;
			    		            this.i = i;
			    		          
			    		        }
			    		        
			    		        public int compareTo(Pair p) {
			    		      
			    		        	
			    		            if (this.x/bblock == p.x/bblock) {
			    		                return (int)(this.y-p.y);
			    		            }
			    		            return (int)(this.x/bblock - p.x/bblock);
			    		        }
			    		        
			    		        public String toString(){
			    		        	return x + " " + y;
			    		        }
			    		        
			    		        public boolean equals(Object o){
			    		        	if(o instanceof Pair){
			    		        		Pair a = (Pair)o;
			    		        		
			    		        		return this.x == a.x;
			    		        	}
			    		        	
			    		        	return false;
			    		        }
			    		        
			    		        public int hashCode(){
			    		        	return new Long(x).hashCode()*31 + new Long(y).hashCode();
			    		        }
			    		    
			    		    }
			    		    
			    			
			    			public static int gcd(int a, int b) {
			    				if (b == 0) return a;
			    				return gcd(b, a%b);
			    			}
			    	
			    			void build(int n) {  // build the tree
			  				  for (int i = n - 1; i > 0; --i) seg[i] = Math.min(seg[i<<1],seg[i<<1|1]);
			  				}
		
			  			public static void modify(int p, int val,int n) {  // set value at position p
			  				  for (seg[p += n] = val; p > 1; p >>= 1) seg[p>>1] = Math.min(seg[p],seg[p^1]);
			  				}
		
			  				int query(int l, int r,int n) {  // sum on interval [l, r)
			  				  int res = Integer.MAX_VALUE;
			  				  
			  				  if(l>r){
			  					  return res;
			  				  }
			  				  
			  				  for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
			  				    if ((l&1) == 1) res = Math.min(res, seg[l++]);
			  				    if ((r&1) == 1) res = Math.min(res, seg[--r]);
			  				  }
			  				  return res;
			  				}
			    				
	//		    			public static void update(int x,int val){
	//		    				while(x<=maxval){
	//		    					tree[x] += val;
	//		    					x = (x&-x);
	//		    				}
	//		    			}
			    			
			    			public static int read(int idx){
			    				int sum = 0;
			    				
			    				while(idx>= 0){
			    					sum += tree[idx];
			    					idx -= (idx&(-idx));
			    				}
			    				
			    				return sum;
			    			}
			    			
			    			public static int find(int i){
			    				if(parent[i] != i){
			    					return find(parent[i]);
			    				}
			    				
			    				return i;
			    			}
			    			
			    			public static void union(int a,int b){
			    				int x = find(a);
			    				int y = find(b);
			    				
			    				if(x!=y){
			    					if(size[x] > size[y]){
			    						size[x] += size[y];
			    						parent[y] = x;
			    					}else{
			    						size[y] += size[x];
			    						parent[x] = y;
			    				}
			    				}
			    			}
			    			
			    			
			    			
			    			
			    			
			    		    /*static */ void solve() throws NumberFormatException,InputMismatchException, IOException {
			    		    
			    		    	//Scanner in = new Scanner(System.in);
			    		    	
			    		    	String s = in.next();
			    		    	
			    		    	int a = 0;
			    		    	int b = 0;
			    		    	
			    		    	for(int i = 0;i<s.length();i++){
			    		    		if(s.charAt(i) == '0'){
			    		    			a++;
			    		    		}else{
			    		    			b++;
			    		    		}
			    		    		
			    		    		if(b>a){
			    		    			out.println(-1);
			    		    			return;
			    		    		}
			    		    	}
			    		    	int n = s.length();
			    		    	int arr[] = new int[n];
			    		    	int count = 1;
			    		    	
			    		    	Queue<Integer> q1 = new LinkedList();
			    		    	Queue<Integer> q2 = new LinkedList();
			    		    	
			    		    	for(int i = 0;i<n;i++){
			    		    		int c = (int)(s.charAt(i)-'0');
			    		    		
			    		    		if(c == 0){
			    		    			if( q2.size() == 0){
			    		    				arr[i] = count++;
			    		    				q1.add(i);
			    		    			}else{
			    		    				int x = q2.poll();
			    		    				arr[i] = arr[x];
			    		    				q1.add(i);
			    		    			}
			    		    		}else{
			    		    			if(q1.size() == 0){
			    		    				arr[i] = count++;
			    		    				q2.add(i);
			    		    			}else{
			    		    				int x = q1.poll();
			    		    				arr[i] = arr[x];
			    		    				q2.add(i);
			    		    			}
			    		    		}
			    		    	}
			    		    	
			    		    	HashMap<Integer,ArrayList<Integer>> map = new HashMap();
			    		    	
			    		    	for(int i = 0;i<n;i++){
			    		    		ArrayList<Integer> list = map.get(arr[i]);
			    		    		
			    		    		if(list == null){
			    		    			list = new ArrayList();
			    		    		}
			    		    		
			    		    		list.add(i);
			    		    		
			    		    		map.put(arr[i], list);
			    		    	}
			    		    	
			    		    	
			    		    	
			    		    	StringBuilder sb = new StringBuilder();
			    		    	sb.append(map.size()+"\n");
			    		    	int g = 0;
			    		    	for(Integer ss: map.keySet()){
			    		    		ArrayList<Integer> list = map.get(ss);
			    		    		sb.append(list.size() + " ");
			    		    		int x = 0;
			    		    		
			    		    		int f = 0;
			    		    		for(Integer sss:list){
			    		    			sb.append(sss+1 + " ");
			    		    			x++;
			    		    			
			    		    			if(x == list.size()){
			    		    				if(s.charAt(sss) == '1'){
			    		    					f = 1;
			    		    					break;
			    		    				}
			    		    			}
			    		    		}
			    		    		
			    		    		if(f == 1){
			    		    			g = 1;
			    		    			break;
			    		    		}
			    		    		
			    		    		sb.append("\n");
			    		    	}
			    		    	
			    		    	if(g == 1){
			    		    		out.println(-1);
			    		    	}else{
			    		    		out.println(sb);
			    		    	}
			    		    	
			    		    	
			    	    	}
			    			
			    	    	public static void add(int i){
			    	    		low[disc[i]]++;
			    	    		disc[i]++;
			    	    	}
			    		    
			    		    
			    		    public static void uu(int arr[],int i,int f){
			    		    	if(i == 1){
			    		    		return;
			    		    	}
			    		    	int next = i/2;
			    		    	int x = 0;
			    		    	if(i%2 == 0){
			    		    		x = i+1;
			    		    	}else{
			    		    		x = i-1;
			    		    	}
			    		    	
			    		    	if(f == 1){
			    		    		arr[next] = arr[i] ^ arr[x];
			    		    	}else{
			    		    		arr[next] = arr[i]|arr[x];
			    		    	}
			    		    	
			    		    	uu(arr,next,1-f);
			    		    }
			    		    
			    		   
				    
			    		   
			    		  
			    		
			    		    public static String reverse(String s){
			    		    	
			    		    	String ans = "";
			    		    	
			    		    	for(int i = s.length()-1;i>=0;i--){
			    		    		ans += s.charAt(i);
			    		    	}
			    		    	
			    		    	return ans;
			    		    	
			    		    }
			    			
			    			
			    		    
			    		 
			    		    public static long sum(long x){
			    		    	return x<10?x:x%10 + sum(x/10);
			    		    }
			    			
			    			public static long gcd(long x, long y) {
			    				if (x == 0)
			    					return y;
			    				else
			    					return gcd( y % x,x);
			    			}
			    			static long inv(long x , long mod)
			    			{
			    				long r,y;
			    				for(r=1,y=mod-2;y!=0;x=x*x%mod,y>>=1)
			    				{
			    					if((y&1)==1)
			    						r=r*x%mod;
			    				
			    				}
			    				return r;
			    			}
			    			
			    			public static long pow(long x,long y,long n){
			    				if(y==0)
			    					return 1%n;
			    				if(y%2==0){
			    					long z=pow(x,y/2,n);
			    					return (z*z)%n;
			    				}
			    				return ((x%n)*pow(x,y-1,n))%n;
			    			}
			    			
			    			
			    			
			    			
			    			public static boolean isPrime(long a) {
			    				// Corner cases
			    				if (a <= 1)
			    					return false;
			    				if (a <= 3)
			    					return true;
			    		 
			    				// This is checked so that we can skip 
			    				// middle five numbers in below loop
			    				if (a % 2 == 0 || a % 3 == 0)
			    					return false;
			    		 
			    				for (long i = 5; i * i <= a; i = i + 6)
			    					if (a % i == 0 || a % (i + 2) == 0)
			    						return false;
			    		 
			    				return true;
			    			}
			    			
			    		
			    			void run() throws NumberFormatException, InputMismatchException,IOException {
			    				in = new FastScanner();
			    				out = new PrintWriter(System.out);
			    		
			    				solve();
			    		
			    				out.close();
			    			}
			    		
			    			class FastScanner {
			    				BufferedReader br;
			    				StringTokenizer st;
			    		
			    				public FastScanner() {
			    					br = new BufferedReader(new InputStreamReader(System.in));
			    				}
			    		
			    				String next() {
			    					while (st == null || !st.hasMoreTokens()) {
			    						try {
			    							st = new StringTokenizer(in.br.readLine());
			    						} catch (IOException e) {
			    							// TODO Auto-generated catch block
			    							e.printStackTrace();
			    						}
			    					}
			    					return st.nextToken();
			    				}
			    		
			    				int nextInt() {
			    					return Integer.parseInt(next());
			    				}
			    		
			    				long nextLong() {
			    					return Long.parseLong(next());
			    				}
			    		
			    				double nextDouble() {
			    					return Double.parseDouble(next());
			    				}
			    			}
			    			
			    			
			    			
			    			
			    		 
			    		
			    			public static void main(String[] args) throws NumberFormatException,InputMismatchException, IOException {
	//		    				 new Thread(null ,new Runnable(){
	//		    				       public void run(){
	//		    				           try{
	//		    				        		
	//		    				               test();
	//
	//		    				           } catch(Exception e){
	//		    				               e.printStackTrace();
	//		    				           }
	//		    				       }
	//		    				   },"1",1<<26).start();
	//		    				   	   }
	//		    				    static StringBuilder sb;
	//		    				    public static void test() throws IOException{
	//		    				    	 sb=new StringBuilder();
	//		    				    	int t=1;
	//		    				    	while(t-->0){
	//		    				    		
	//		    				    		solve();
	//		    				    		
	//		    				    	}
	//		    				    	
	
		    				    new pprac().run();
			    			}
			    				    
			    			
			    		}
			    		class Node{
			    			int a;
			    			int b;
			    			public Node(int i, int j) {
								this.a = i;
								this.b = j;
								
							}
						
			    			
			    		}
			    		
			    		class MyComp implements Comparator<String>{
			    		    
			    			int c = 0;
			    			
			    			MyComp(int d){
			    				c = d;
			    			}
			    			
			    			@Override
			    			public int compare(String a,String b) {
			    				
			    				// < == -1
			    				
			    				String arr[] = a.split(" ");
			    				String brr[] = b.split(" ");
			    				
			    				return arr[c].compareTo(brr[c]);
			    				
			    				
			    			}
			
			    			
			    		}
			    		
			    		class MyComp2 implements Comparator<Node>{
			    		    
			    		
			    			
			    			@Override
			    			public int compare(Node a,Node b) {
			    				
			    				// < == -1
			
			    				
			    				if(a.b > b.b){
			    					return -1;
			    				}else{
			    					return 1;
			    				}
			    				
			    				
			    			}
			
			    			
			    		}