public int[] CycleDecompToPerm(int[][] CycleDecomp){
		int CycleNumber = 0;
		int CycleIndex = 0;
		int[] CurrentPerm = NewPerm();
		ArrayList<Integer> cycle = new ArrayList<Integer>(n);
		while(CycleDecomp[CycleNumber][0] != 0){
			while(CycleDecomp[CycleNumber][CycleIndex] != 0){
				cycle.add(CycleDecomp[CycleNumber][CycleIndex]);
				CycleIndex++;
				if(CycleIndex >= CycleDecomp[CycleNumber].length){
					break;
				}
			}
			int[] theCycle = new int[cycle.size()];
			for(int j = 0; j < theCycle.length; j++){
				theCycle[j] = cycle.get(j);
			}
			CurrentPerm = Product(CurrentPerm,CycleToPerm(theCycle));
			CycleIndex = 0;
			cycle.clear();
			CycleNumber++;
			if(CycleNumber >= CycleDecomp.length){
				break;
			}
		}
		return CurrentPerm;
	}