Construct a piece of music using the designated motif as the basis, while ensuring the required form is followed.
X:1
L:1/8
M:6/8
K:D
['g f2 A d2 f', 'd2 f g2 f e2 d'  
X:1
L:1/8
M:6/8
K:D
|: g | f2 A d2 f | e2 d B2 g | f2 A d2 f |{a} g3 a2 g | f2 A d2 f | e2 d B2 c | d2 A B2 G | 
 E2 F D :: f/g/ | a2 b a2 f | d3- d2 f | g2 f e2 d | B3 A f/g/ | a2 b a2 f | d2 f g2 f | 
 e2 d c2 e | a3- a2 :|  