Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:D
['d>e f>a'  
X:1
L:1/8
M:4/4
K:D
 A |"D" d2"A7" c<A"D" d>e f>a |"G" g>f"D" a<f"Em" e2"A7" e>f |"D" d2"A7" c<A"D" d>e f>a | 
"Em" B<e"A7" c<A"D" d3 :: e |"D" f2 f>e"Bm" d>e f<d |"G" g>e"D" f>d"Em" e2"A7" e>A | 
"D" f2 f>e"Bm" d>e f<a |"Em" B<e"A7" c<A"D" d3 :|  