Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
Q:1/2=80
M:4/4
K:A
['AEBE (3(cBc)', 'A2 aecA gefd ec (d/c/B/A/) GBBg aecA'  
X:1
L:1/8
Q:1/2=80
M:4/4
K:A
 AEBE (3(cBc) d2 | ceAc BBGE | AEBE (3(cBc) df | ecdB AG A2 :: aecA gefd | ec (d/c/B/A/) GBBg | 
 aecA aefd | ecfd (3(gfg) a2 | eaca Acec | dcBA GABG | AEBE (3(cBc) df | ecdB A"^sic"F A2 :|  