Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/4
M:4/4
K:D
['f a2 f e'  
X:1
L:1/4
M:4/4
K:D
|:"D" f a2 f | e d2 d/e/ | f a2 f |"A7" e d e2 |"D" f a2 f | e d2 e/f/ |"Em" g e"D" f d |1 
"G" B3 d/e/ :|2"G" B3 c/B/ |:"D" A3 F | A3 B/c/ | d e f d | f d"G" B c/B/ |"D" A3 F | A3 B/c/ | 
 d e f d |1"A7" c B/c/"D" d c/B/ :|2"A7" c B/c/"D" d2 ||  