First determine the style (capital letters), such as ring with R, earrings with E, and so on.
Then determine the cutting work of the gem, such as square, round, heart-shaped and so on.
Finally, if the above two items are the same, they should be coded according to different weights, so that they can be closed.
If you have many kinds of gems, you can add them to the front.