Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['Adef- fAfe dBBd A2 (3AAA ABde f2', 'e2 fe'  
X:1
L:1/8
M:4/4
K:D
|: A2 AF Adef- | fAfe dBBd | A2 (3AAA ABde | f2 af eddB | ABAF Adef- | fAfe dBBd | A2 (3AAA ABde | 
 f2 af edde :: f3 g fedf | e2 fe dBBe | f3 g fedf | e2 fe edde | f3 a- afdf | e2 fe dBBd | 
 A2 (3AAA ABde | faag fedB :|  