Sort:  

I figured out a way to do it but it takes ages... :(
Counting now wherever the line could go XD