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/4
K:D
['a affa affa gggg (g2 f)f fddf', 'cccc d3 (e/f/)'  
X:1
L:1/8
M:2/4
K:D
 a | affa | affa | gggg | (g2 f)f | fddf | fddf | gedc | (c2 d) || a | cccc | d3 (e/f/) | gggg | 
 (g2 f)a | cccc | d3 (e/f/) | gedc | d3 |]  