Another way is to assign them serially from best to worst, to make team more nearly of equal skill.

       -A-- -B--
   1   rank team
   2    1    A  
   3    2    B  
   4    3    C  
   5    4    D  
   6    5    A  
   7    6    B  
   8    7    C  
   9    8    D  
  10            
  11    9    D  
  12    10   C  
  13    11   B  
  14    12   A  
  15    13   D  
  16    14   C  
  17    15   B  
  18    16   A