Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:G
['d>B B>A B>G', 'A Bdef gdBG Bdef g2 fa gfge'  
X:1
L:1/8
M:4/4
K:G
 e | d>B B>A B>G E2 |{DEF} GG G/A/ B/c/ d2 B>d | d>B B>A B>G E>G | FA (D/E/F/D/) G2 G :| | A | 
 Bdef gdBG | Bdef g2 fa | gfge dB BG | FA (D/E/F/D/) G2 G :|  