Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
Q:1/2=60
M:2/2
K:A
['e d2', 'z e eacd eacd ea ed/c/ TB3'  
X:1
L:1/8
Q:1/2=60
M:2/2
K:A
 A | e d2 c c B2 A | AB/c/ dc B/A/B/c/ Bc/d/ | e d2 c2 B2 A | GA/B/ cB A2 z :: e | eacd eacd | 
 ea ed/c/ TB3 A/B/ | =caAB =caAB |{d} =cB/A/ BA/G/ A3 :|  