Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
M:4/4
K:G
['BG AGFG AG (3GGG Addc ABGB AFDE', 'd g3'  
X:1
L:1/8
M:4/4
K:G
 G2 BG AGFG | AG (3GGG Addc | ABGB AFDE | FEFG ABcA | (3GGG BG AGFG | AG (3GGG Addc | ABGB AFDE | 
 FEFG ABcA || d g3 a g3 | d g3 fdcA | d g3 a g3 | d^cde fd=cA | d g3 ag (3efg | abag f3 g | 
 af (3gfe fde^c | d2 eg fdcA ||  