I suppose the 16 types from socionics come from the classical 4 temperaments developed originally by Hippocrate:

See if this is correct:

melancholic INTj - INFj - ISFj - ISTj

phlegmatic INTp - INFp - ISFp - ISTp

choleric ENTp - ENFp - ESFp - ESTp

sanguinic ENTj - ENFj - ESFj - ESTj


As can be noticed, the groups are either j/p types as a common charactheristic and also either introvert/extrovert

Moreover in each group (melancholic etc) there is one representative of a Socion group, which are also 4. Thus, it goes like this:

melancholic groupie
INTj - belongs to Alpha quadra of socion
INFj - belongs to Delta quadra of socion
ISFj - belongs to Gamma quadra of socion
ISTj - belongs to Beta quadra of socion

The same is with the others

And also the melancholic make great team, based on socionics intertype relationships, with the sanguinic
while the phlegmatic make great team with the choleric