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:4/4
K:D
['d2 FB AFEF Dddc BABc dF F2', 'defd egfd A2 (3cBA eA (3cBA', ''  
X:1
L:1/8
M:4/4
K:D
 d2 FB AFEF | Dddc BABc | dF F2 AF F2 | EDCE Dgfe | d2 FB AFEF | Dddc BABc | dF F2 AF F2 | 
 EDCE D2 || (3ABc | defd egfd | A2 (3cBA eA (3cBA | defd e2 fg | abag fdec | defd egfd | 
 A2 (3cBA eA (3cBA | defg abag | fdec dgfe || d8 ||  