Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:Dmix
['B2 AG FDDE', 'd^cde f2 ed gefd'  
X:1
L:1/8
M:4/4
K:Dmix
 B2 AG FDDE | (3FGA DF ADFA | B2 AG FDDE | EC C2 EFGA | B2 AG FDDE | (3FGA DF ADFA | B2 AG FDDE | 
 E2 ED EFGA || d^cde f2 ed | gefd eBBA | Add^c defd | (3gag fg efge | d^cde f2 ed | gefd edBe | 
 (3d^cB cA Bcde | f2 af fedA ||  