Add hashset based on first permutation