Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:D
['feBc dBAF', 'aefg afbf e2 fg afbf aefg afed', 'AGFD AF(ED) D4- |[M:2/4] D2 AB A2'  
X:1
L:1/8
M:4/4
K:D
O fefg feBc | dBAF E2 E2 | c2 ef edBc | dBAF D2 D2 | fefg feBc | dBAF E2 E2 | beag feBc | 
 dBAF D4- |[M:2/4] D2 |: fg |[M:2/2] afbf aefg | afbf e2 fg | afbf aefg | afed d2!D.C.!O :| AB | 
 A2 (FD) ABAF |[M:2/4] E2 [DA]2 |[M:2/2] A2 AB AGFD | AF(ED) D4- |[M:2/4] D2 AB | A2 (FD) ABAF | 
[M:2/4] E2 [DA]2 |[M:2/2] A2 AB Aafe | dBAF [DA]4 ||  