You are given a list of strings.
A subset of strings is considered valid if, after concatenating all selected strings, every character appears at most once.
Your goal is to return any valid subset that maximizes the total number of distinct characters covered.
If multiple subsets achieve the same maximum coverage, returning any one of them is acceptable.
In plain English, the overall goal is to choose a subset of strings so that no character is repeated across the chosen strings, while covering as many distinct characters as possible.
The project already includes helper logic used by the test suite to validate a candidate subset and measure how many distinct characters it covers. However, that logic is currently incorrect for some cases.
Your task is to update the existing implementation so that it correctly:
- rejects invalid subsets,
- accepts valid subsets, and
- computes the correct number of covered distinct characters.
Keep the public behavior and interfaces unchanged.
test_valid_selection_scores_distinct_characters
test_rejects_internal_duplicate_word
test_rejects_global_character_overlap
test_rejects_words_not_in_input
test_empty_selection_is_valid