code: @Override
      public Pair<D, Integer> answerQuery(Word<I> prefix, Word<I> loop, int repeat) {
          assert repeat > 0;
  
          final List<S> states = new ArrayList<>(repeat + 1);
          final WordBuilder<I> wb = new WordBuilder<>(prefix.length() + loop.length() * repeat, prefix);
  
          S stateIter = simpleDTS.getState(wb);
  
          if (stateIter == null) {
              return Pair.of(null, -1);
          }
  
          states.add(stateIter);
  
          for (int i = 0; i < repeat; i++) {
              final S nextState = simpleDTS.getSuccessor(stateIter, loop);
  
              if (nextState == null) {
                  return Pair.of(null, -1);
              }
  
              wb.append(loop);
  
              int prefixLength = prefix.length();
              for (S s : states) {
                  if (isSameState(wb.toWord(0, prefixLength), s, wb.toWord(), nextState)) {
                      return Pair.of(simulatorOracle.answerQuery(wb.toWord()), i + 1);
                  }
                  prefixLength += loop.length();
              }
  
              states.add(nextState);
              stateIter = nextState;
          }
  
          return Pair.of(null, -1);
      }
docs: Returns an answer for an {@link OmegaQuery}.
  
  The output is obtained through the {@link SimulatorOracle}, while the states are obtained by means of creating
  two access sequences to states in the simulated automaton.
  
  @see OmegaQueryAnswerer#answerQuery(Word, Word, int)