Express the union, intersection and product of a venn diagram of two circles using Psuedocode

Assume we have a Venn diagram of two circles. We have to find the union, intersection and the product of them. For example, we have the sets:

A={a,b,f,g} and B={b,e,f,h}

Union AUB={a,b,e,f,g,h}

Intersection A∩B={f,g}

Product A⋅B={ab,ae,af,ah,bb,be,bf,bh,fb,fe,ff,fh,gb,ge,gf,gh}

My question is, how do we write these operations in Pseudocode? I don’t know how to do it. Any help is appreciated. Thank you.