public ListOrderedSet<String> matcher(CharSequence text) {
        ListOrderedSet<String> strings = new ListOrderedSet<>();
        Set<Object> reachable = new ReachableVertices(this.automata, 0).getReachable();
        StringBuilder temp = new StringBuilder();

        for (int i = 0; i < text.length(); i++) {
            Set<Object> next = new ListOrderedSet<>();
            int index = this.pattern.indexOf(text.charAt(i));

            System.out.println(reachable + "--" + text.charAt(i));

            while (reachable.contains(index)) {
                next.add(index + 1);
                reachable.remove(index);
                index = this.pattern.indexOf(text.charAt(i), index + 1);
                if (index < 0) break;
            }

            if (!next.isEmpty()) {
                reachable = new ReachableVertices(this.automata, next).getReachable();
                temp.append(text.charAt(i));
                if (reachable.contains(null)) {
                    strings.add(new String(temp));
                    temp = new StringBuilder();
                    reachable = new ReachableVertices(this.automata, 0).getReachable();
                    System.out.println("Match");
                }
            } else reachable = new ReachableVertices(this.automata, 0).getReachable();


        }
        return strings;
    }