for a in Sorted(a_i) Result += Sorted List[a]