Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:2/4
K:D
['af/a/ ba fa gg Bc', 'f>e fe dc BA'  
X:1
L:1/8
M:2/4
K:D
|: fa af/a/ | ba fa | gg Bc | ed c/B/A | a2 af/a/ | ba fa | gg Bc | ed d2 :: f>e fe | dc BA | 
 g>f ga | ba f/g/a | f>e fe | dc BA | gg Bc | ed d2 :|  