Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/16
Q:1/8=180
M:2/4
K:D
['AB (dA2)A (BG2)G BABc d2cd efed efed', 'ea2b agef'  
X:1
L:1/16
Q:1/8=180
M:2/4
K:D
|: AB | (dA2)A (BG2)G | BABc d2cd | efed efed | efge a2ga | ba2b agef | gedB A2GA | Bdef edBG | 
 A6 :| cd | ea2b agef | gafa gfed | ea2b afgb | a6 ed | ea2b agef | gedB G2A2 | Bdef edBG | A6 :|  