Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:C
['Bge dBA BAB GAB', 'gfe fed efg'  
X:1
L:1/8
M:4/4
K:C
[M:6/8][K:G] .abc D | GFG AGA | Bge dBA | BAB GAB | AGE GED | GFGAGA | Bge dBA | BAB GAB | 
 AGF G2 :: f | gfe fed | efg dBG | Bee dBA | Bee e2 f |1 gfe fed | efg dBA | BAB GAB | AGF G2 :|2 
 gbg faf | egedBA | BAB GAB | AGF G2 |]  