Simplified the solution for grouped characters...