Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:Gmin
['G<GB>G d<GB<g', 'c<aB<g A>fc>f A<FF>A'  
X:1
L:1/8
M:4/4
K:Gmin
 D | G<GB>G d<GB<g | F>FA>F c<FA<f | G<GB>G d<GB<g | f>d{d}c>A B<GG :| d | g<bd<b c<aB<g | 
 A>fc>f A<FF>A | g<bd<b c<aB<g | A>gd>g B<GG>d | g<bd>b c<aB<g | A>fc>f A<FF>A | G<GB>G d<GB<g | 
 f>d{d}c<A BGG ||  