Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:7/8
K:Amin
['c2 cBA', 'ABcd eg z (d4 d) B2'  
X:1
L:1/8
M:7/8
K:Amin
|: A2 c2 cBA | B2 E2 E2 e | d2 B2 Bcd | c2 BA BGE | A2 c2 cBA | B2 E2 E2 E | F2 c2 cBA | 
 D2 B2 BAG :: ABcd eg z | (d4 d) B2 | c2 A2 ABc | B2 E2 E2 B | ABcd eg z | (d4 d) B2 | A2 a2 age | 
 d2 a2 age :|  