private static int[][][] getDestinations(int statesCount, int eventsCount, int[][] cnt, Random random) {
		int[][][] ans = new int[statesCount][eventsCount][];
		for (int stateNum = 0; stateNum < statesCount; stateNum++) {
			for (int eventNum = 0; eventNum < eventsCount; eventNum++) {
				int size = 0;
				if (cnt[stateNum][eventNum] >= 0) {
					size = (int) Math.pow(2, cnt[stateNum][eventNum]);
				}
				ans[stateNum][eventNum] = new int[size];
				Arrays.fill(ans[stateNum][eventNum], -1);
			}
		}

		for (int stateNum = 0; stateNum < statesCount; stateNum++) {
			boolean was = false;
			for (int eventNum = 0; eventNum < eventsCount; eventNum++) {
				for (int tr = 0; tr < ans[stateNum][eventNum].length; tr++) {
					if (!was) {
						ans[stateNum][eventNum][tr] = (stateNum + 1) % statesCount;
						was = true;
					} else {
						int dst = random.nextInt(statesCount);
						ans[stateNum][eventNum][tr] = dst;
					}
				}
			}
		}

		return ans;
	}