Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:2/2
K:G
['e>A (3AAA', 'BGBd eg{a}gf gabg'  
X:1
L:1/8
M:2/2
K:G
|: e>A (3AAA egfg | e>A (3AAA BGBd | e>A (3AAA efgb |1 afge dgfg :|2 afge !fermata!d2 Bd | 
 e>g({a} (3gfg) afge | dggd BGBd | e>g({a} (3gfg) afgb | afge d2 Bd || 
 e>g({a} (3gfg) b>g({a} (3gfg) | dggd BGBd | eg{a}gf gabg | afge dgf"_D.C."g |]  