For i = 1 To 5
k = i
For j = i + 1 To 6
If a(k) > a(j) Then k = j
Next j
t = a(k): a(k) = a(i): a(i) = t
b((i + 2) Mod 6 + 1) = a(i)
Next i