Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/16
Q:1/8=80
M:2/2
K:none
['f4 |{gef} e2a2{fg}f2{g}ef'  
X:1
L:1/16
Q:1/8=80
M:2/2
K:none
|: f2 |{g} B3/2{d}B/{e}Bc{gBd}B2{G}A2 |{g} Bc<de/{gfg} f4 |{g} e2>f2{g}e>f{gef}ed | 
{gcd} c2{e}A2{GAG}A2f2 |{g} B3/2{d}B/{e}Bc{gBd}B2{G}A2 |{g} B>cd>e{gfg} f4 |{gef} e2a2{fg}f2{g}ef | 
{Gdc} d2{g}B2{GdG}B2 ::{Gdc} de |{gfg} f4{gBG} B2>f2 |{g} B3/2{d}B/{e}B{d}c{gfg} f4 | 
{g} e2>f2{g}e>f{gef}ed |{gcd} c2{e}A2{GAG}A2 |1{Gdc} de ||1{gfg} f4{gBG} B2>f2 | 
{g} B3/2{d}B/{e}B{d}c{gfg} f4 |{gef} e2a2{fg}f2{g}ef |{Gdc} d2{g}B2{GdG}B2 :|2 f2 | 
{g} B3/2{d}B/{e}Bc{gBd}B2{G}A2 |{g} B>cd>e{gfg} f4 |{gef} e2a2{fg}f2{g}ef |{Gdc} d2{g}B2{GdG}B2 |]  