I am trying to generate the possible combinations from the below groups

A1 B1 C1

A2 B2 C2

A3

The output shall be like

A1B1C1

A1B1C2

A1B2C1

A1B2C2

A2B1C1

A2B1C2

A2B2C1

A2B2C2

A3B1C1

A3B1C2

A3B2C1

A3B2C2

Any idea how this output can be genarated ,... using recursive functions

Thanks in advance

Regards

Sumod