public int getCycle(String initial, String current) {
		int state = 1;
		String rotate = initial;
		while(state <= 4){
			if(rotate.equals(current))
				return state;
			StringBuffer sb = new StringBuffer();
			sb.append(rotate.substring(3));
			sb.append(rotate.substring(2, 3));
			sb.append(rotate.substring(0,1));
			sb.append(rotate.substring(1,2));
			rotate = sb.toString();
			state++;
		}
		return -1;
	}