Compose melodies that adhere to the given musical framework, integrating the provided motif.
X:1
L:1/8
M:4/4
K:D
['D2 FA BAFA', 'D2 ag fgab afdg fdad bdaf efga'  
X:1
L:1/8
M:4/4
K:D
 (3ABc | d D3 EDB,D | D2 FA BAFA | dDcD BDAD | D2 FA BAFA | d D3 EDB,D | D2 FA BAFA | 
 (3Bcd ec dBAF | EDEF D2 :| ag | fgab afdg | fdad bdaf | efga ge=cf | e=cgc acge | fgaf bfaf | 
 gfeg fdBc | defd edBd | AFEF D2 :|  