Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:2/2
K:G
['G2 (BG)', 'g2 (bg) dgbg gbag'  
X:1
L:1/8
M:2/2
K:G
 D | G2 (BG) DGBG | ABcA BGGB | A^GAB cBcA | EAAG FDEF | G2 (BG) DGBd | cBAB cdef | gedB c2 (Bc) | 
 dBcA (BG) G2 || | f | g2 (bg) dgbg | gbag fdde | =f2 af dfaf | gbag =fdd^f | g2 (bg) dgbg | 
 gbag fdef |{a} gedB c2 (Bc) | dB{d}cA (BG) G2 |]  