Ooh, this is another super fun question! I love these puzzle forms.
@khantaung you have the right idea but the tricky thing is considering all of the previously-selected choices no matter how many repeats there are.
Take a look at the form here for a solution that I believe should work for any number of choices and any number of repeats.