Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:Amin
['B c<A A>B c<A A>c B<d d>c', 'a>ee>d c>AA>c'  
X:1
L:1/8
M:4/4
K:Amin
 B | c<A A>B c<A A>c | B<d d>c BGGB | c>Ad>B e>cd>B | e/d/c/B/ e>B cAA :| ^g | a>ee>d c>AA>c | 
 B>gdg bGG^g | a>ee>d c>Aa>g | f/e/d/c/ B/c/d/B/ cAA^g | a>ee>d c>AA>c | B>gd>g BGGB | 
 (3ABc (3Bcd (3cde (3def | e>a^g>b aAA ||  