Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:D
['AFEF D2', 'AFEF D2 DE'  
X:1
L:1/8
M:4/4
K:D
 dB | AFEF D2 DE | FDFA d2 de | fedB AFDE | FEED E2 dB | AFEF D2 DE | FDFA d2 de | fedB AFEF | 
 D2 DE D2 :| dB | ABde f2 ef | gfed e2 de | f2 fe dBAF | FEED E2 dB | AFEF D2 DE | FDFA d2 de | 
 fedB AFEF | D2 DE D2 :|  