One jewelry workshop delivered a large order of precious stones. But the roads are terrible and in a box, neatly arranged, stones strongly intermingled. Goods for the huge sum of money, the storekeeper should accept it as a fact. But count all the stones are very difficult to sort them first. Fold the same stones together.