Compose melodies that adhere to the given musical framework, integrating the provided motif.
X:1
L:1/8
Q:1/4=140
M:4/4
K:D
['(3ABc dcdA FAdf edcB A2 g2 fgaf', 'fg afaf'  
X:1
L:1/8
Q:1/4=140
M:4/4
K:D
|: (3ABc | dcdA FAdf | edcB A2 g2 | fgaf gfed | cdec A2 (3ABc | dcdA FAdf | edcB A2 g2 | 
 fgaf bgec | d2 f2 d2 :: fg | afaf d2 ga | bgbg e2 fg | afaf bagf | edcB A2 (3ABc | dcdA FAdf | 
 edcB A2 g2 | fgaf bgec | d2 f2 d2 :|  