python gem stones implementation - start using sets