Sorting stones in a diamond office