Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:6/8
K:A
['f/g/ a2 A agf e2 e edc', 'E2 e ef=g fef dBB B2 c'  
X:1
L:1/8
M:6/8
K:A
 f/g/ | a2 A agf | e2 e edc | d2 d dbd | c2 c c2 B | cde Bcd | cde fga | gfe fe^d | eBG E2 :: e | 
 ef=g fef | dBB B2 c | def fed | cAA A2 g | fga def | GAB EAd | cea cdc | AEC A,2 :|  