Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:D
['ag fadf AdFA DFAd FAdf gfga bged', 'd2 cd ecfd gece fdge afdf gfba'  
X:1
L:1/8
M:4/4
K:D
|: ag | fadf AdFA | DFAd FAdf | gfga bged | c2 A2 A2 fe | dAFD GBAG | FAdf edfa | gfed cbag | 
 f2 d2 d2 :: cd | ecfd gece | fdge afdf | gfba gfed | cdec A2 fe | dAFD GBAG | FAdf edfa | 
 gfed cbag | f2 d2 d2 :|  