Added function for getting group in solution.