def ticksort(l):
ll = l.copy()
r = []
c = 0
while True:
c += 1
e = 0
for i in range(len(ll)):
ll[i-e] -= 1
if ll[i-e] <= 0:
r.append(ll[i-e] + c)
ll.remove(ll[i-e])
e += 1
if ll == []:
break
return r
TEST_CASE = [7, 11, 5, 2, 3, 0]
print(ticksort(TEST_CASE))