Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:Emin
['E<EGA FDFA E<E G>A BEGB dd e/d/^c/B/', 'BEGB e>f (g/b/).a/.g/ fdfa e<ege bgeB dd'  
X:1
L:1/8
M:4/4
K:Emin
 E<EGA FDFA | E<E G>A BEGB | dd e/d/^c/B/ ADFA | E<E G>A BEGB :: e>f (g/b/).a/.g/ fdfa | 
 e<ege bgeB | dd (e/d/).^c/.B/ ADFA |1 E<E G>A BEGB :|2 E>F (G/B/)(A/c/) BEGB ||  