public int minColors(int[] colors)
	{
		boolean[] isDependence = new boolean[colors.length]; 
		Arrays.sort(colors);
		for(int i=0;i<30;i++){
			for(int j=0;j<colors.length;j++){
				if(isDependence[j])
					continue;
				
				if(((1<<i)&colors[j]) > 0){
					for(int k=0;k<colors.length;k++){
						if(j==k)
							continue;
						if((((1<<i)&colors[k]) > 0)){
							colors[k] ^= colors[j];
						}
					}
					isDependence[j] = true;
					break;
				}
			}
		}
		
		int res = 0;
		for(int i=0;i<colors.length;i++){
			if(isDependence[i])
				res++;
		}
		System.out.println(Arrays.toString(colors));
		return res;
	}