Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:D
['D3 F ADFA dcde fdAF', 'C A,B,CD EFGE FDEF GABc dB B2'  
X:1
L:1/8
M:4/4
K:D
 D3 F ADFA | dcde fdAF | G2 BG FADF | GFED CEA,C | D3 F ADFA | dcde fdAF | GdBG FEDF | EDCE D3 C :| 
 A,B,CD EFGE | FDEF GABc | dB B2 Bcde | fagf e3 f | d2 fd ceAc | dcdB AFDF | GdBG FEDF | 
 EDCE D3 C :|  