finish Hopcroft's algorithm. TODO: char set