Compose melodies that adhere to the given musical framework, integrating the provided motif.
X:1
L:1/8
M:4/4
K:D
['Ad d2', 'e2 A2'  
X:1
L:1/8
M:4/4
K:D
|: a3 g fgaf | gfed fdcd | Ad d2 Ad d2 | cdef gfed | a3 g fgaf | gfed fdcd | Ad d2 Ad d2 | 
 cdec c2 d2 :: e2 A2 e2 A2 | efge decd | e2 A2 e2 A2 | B2 AB GABd | e2 A2 e2 A2 | efge decd |1 
 eAfA gAfA | gfed BABd :|2 edcB Afge | cdec c2 d2 ||  