Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:Amix
['AA a2 afef', 'AAcA ecce'  
X:1
L:1/8
M:4/4
K:Amix
 c | AA a2 afef | afef ecBc | AA a2 afef | afec BB Tf2 :: AAcA ecce | fddf ecca | AAcA ecce | 
 fdec BB Tf2 :|  