Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:3/2
K:G
['B>AG>B A>GA>B', 'A>Bc>A d>ef>d e>fg>e'  
X:1
L:1/8
M:3/2
K:G
 B>AG>B A>GA>B G2 G2 | c>BA>G A2 d2 A>Bc>A | B>AG>B A>GA>B B2 B2 | d>cB>A G2 G2 A>Bc>A :: 
 d>ef>d e>fg>e f2 e>d | c>BA>G A2 A2 A>Bc>A | d>ef>d e>fg>e g2 f>e | d>cB>A G2 G2 A>Bc>A :|  