Construct a musical composition following the designated musical form and incorporating the given motif.
X:1
L:1/8
M:9/8
K:D
['d2 d d2', 'ABA F2 G ABc'  
X:1
L:1/8
M:9/8
K:D
 d2 d d2 e fga | d2 d d2 f ecA | d2 d d2 e fga | bag fge d3 :| ABA F2 G ABc | ded fed e3 | 
 ABA F2 G ABc | dcd ecA d3 :|  