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:2/2
K:D
['A F3 BFAF DEFA B3 d', 'afbf afdf'  
X:1
L:1/8
M:2/2
K:D
|: A F3 BFAF | DEFA B3 d | e B3 gefe | dfed BcdB | A F3 BFAF | DEFA B3 d | egfg efdB | AFEF D4 :: 
 d3 e f3 g | afbf afdf | e B3 g B3 | fedf edBd | A F3 ABdf | afbf afdf | egfg efdB | AFEF D4 :|  