Construct a melodic piece using the designated alphabetic pattern and the provided musical theme.
X:1
L:1/8
M:4/4
K:G
['dgdc BcAG (3EFG AB', 'g3 a g B3']  
X:1
L:1/8
M:4/4
K:G
|: dgdc BcAG | (3EFG AB cAFA | B3 G BccA | BcAG FD D2 | dgdc BcAG | (3EFG AB c2 Bc | d g3 dgfd | 
 cAFA G3 B :: g3 a g B3 | gfga gfed | eaa^g aba=g | eaag edBd | g3 a g B3 | cBAG ABcA | d g3 dgfd | 
 cAFA G2 Bd :|  