Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:G
['G2 dG', 'dg g2'  
X:1
L:1/8
M:4/4
K:G
 G2 dG BGdG | G2 dB cAFA | G2 dG Bcde | fdcB cAFA | G2 GA BGBd | GBdB cAFA | GABc dAeg |1 
 fdcA AGFA :|2 fdcA GABc || dg g2 bgag | dg g2 decA | dg g2 bgag | fdcA G3 B | dg g2 b2 ag | 
 dg g2 defg | a2 ge fdeg |1 fdcA GABc :|2 fdcA G4 ||  