This code analyzes Kaprekar's Routine, a mathematical process, for various number systems (bases) and digit counts. It generates and tests all valid numbers for a given configuration. The code then determines if each number converges to a single fixed point or enters a cycle. Finally, it aggregates and reports the unique outcomes found.