To start answering this, there are three types that are absolutely required on any list for this question.
Since this is the only type that is super-effective against Electric types.
It also hits Fire, Poison, and Steel types.
This is the only type that is super-effective against Normal types.
It also hits Dark, Rock, Steel, and Ice types.
Dark or Ghost
These types are super-effective against the same types, although their resistances are slightly different. They both deal with Psychic and Ghost types.
This means the remainder of the team would need to be composed of types to deal with Grass, Water, Fighting, Ground, Flying, Bug, Dragon, and Fairy types.
I think this is the next logical type to add, as it deals with quite of few of the leftover types. This means you can cross Grass, Ground, Flying, and Dragon types out of the above list.
At this point, the only types you have left to deal with is Fighting, Bug, Fairy, and Water. These types only have one shared weakness.
This is super-effective against Bug and Fighting types.
Water and Fairy don't have any shared weaknesses, so you will need to add two more types, one to cover each of them.
Electric or Grass
These both cover Water types.
Poison or Steel
These both cover Fairy types.
I know you said a maximum of 12 types, but 7 is enough to cover everything. These types are:
The first four I feel are required for any team needed to cover all types. The last 3 can no doubt be swapped around, though. I really don't want to even think about adding dual-types into the mix, so I will leave my answer here.
I hope it helps!