Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:D
['AB cAFA E2 AB ce (3eee', 'ec B2'  
X:1
L:1/8
M:4/4
K:D
|: AB | cAFA E2 AB | ce (3eee fecB | BAFA EFAc | B2 Bc B2 AB | cAFA E2 AB | ce (3eee fece | 
 a2 ae f2 af |1 ec B2 A2 :|2 ec B2 A2 de |: f3 e f3 g | afge f3 g | afec ABce | f2 ec B2 AB | 
 cAFA E2 AB | ce (3eee fece | a2 ae f2 af | ec B2 A4 :|  