Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:2/2
K:Bmin
['BA FBBA BABd cBAf ecBA FB{c}BA B2', 'dfed cAeg faec', 'bafb afec'  
X:1
L:1/8
M:2/2
K:Bmin
 BA | FBBA BABd | cBAf ecBA | FB{c}BA B2 (Bd) | cBAc"^H" B2 :| (Bc) | d2 (dc) dfed | cAeg faec | 
 d2 (dc) defb | afec B2 (Bc) | dcdc dfed | cAeg faec | dcBc defb | afec B2 || Bc | d>B (3BBB bafb | 
 afec ABce | d>B (3BBB bafb | afec B2 (de) | fbbc' bafb | afec ABce | dcBc defb | 
 afec dB"^D.C."cA |]  