Compose a piece of music following the given alphabetical representation of the musical structure and the provided motif.
X:1
L:1/4
M:4/4
K:G
['d d', 'e d']  
X:1
L:1/4
M:4/4
K:G
"^A" d | B d d d | e d d2 | e d d2 | e d d G/A/ | B d d B | A B G G/A/ | B3/2 c/ d B | A2 G || 
"^B" z | g3/2 g/ e g | e d d2 | e d d2 | e d d2 | g3/2 g/ e g | e d B G | B3/2 c/ d B | A2 G ||  