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
['A d2 f', 'd2 f afd afd A2 d f2'  
X:1
L:1/8
M:6/8
K:D
 A | d2 f afd | e2 f g2 b | a2 g fed | def A2 A | d2 f e2 g | f2 d g2 b | agf edc | d3 d2 :: f | 
 afd afd | A2 d f2 a | g2 f e2 d | cec A2 A | dfa afd | ege g2 b | agf edc | d3 d2 :|  