Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:6/8
K:G
['bag egd', 'g/a/bg afd'  
X:1
L:1/8
M:6/8
K:G
|: GED GBd | bag egd | cEG BdG | c3 AFD | G3 G z d | bag egd | cBA BAG | GAF G2 z :: g/a/bg afd | 
 ecg dBd | g/a/bg afd | efg gab | c'ba bag | e/f/gc BGA | Bcd gdB | cAF G2 z :|  