Compose a musical piece using the given motif and adhering to the outlined musical form.
X:1
L:1/8
M:4/4
K:G
['D2 dGGG FAAc BGBd g2 fe dGBG', 'd2 ggfg'  
X:1
L:1/8
M:4/4
K:G
 D2 | dGGG FAAc | BGBd g2 fe | dGBG FAAB | EGFA G2 :: d2 | ggfg afdd | ggfg a2 d2 | ggfg afed | 
 egfa g2 :|  