def compare_counter_sort(l):
C = []
for i in l:
count = 0
for j in l:
if j < i:
count += 1
while(count in C):
count += 1
C.append(count)
return [l[C.index(i)] for i in xrange(len(l))]
if __name__ == '__main__':
print compare_counter_sort([4, 5, 1, 2, 5, 6, 5, 5, 5, 1])