Construct melodic segments by incorporating the provided motif with the designated musical pattern.
X:1
L:1/4
M:3/4
K:D
['d z', 'e2 d', 'd f3 e2 d g3/2 g/ g'  
X:1
L:1/4
M:3/4
K:D
 A/A/ |"A7" A3 | G3 | (c3 | c) z B/B/ | B3 | A2 G |"D" F3 | d z d/d/ | f3 | e2 d |"Em" c3 | 
 B z A/A/ |"A7" A B/A/ G/A/ | c B/A/ G/E/ |"D" D z d | d z z |:"A7" e/e/ e c | f e/e/ e | 
"D" d z F | B z A |"A7" E2 c | E2 c |1"D" F2 d | F2 d :|2"D" d3/2 d/ d | d z z ||[K:G]"G" d3 | g3 | 
"D7" f3 | e2 d | f3 | e2 d |"G" g3 | e2 d | d3 | g3 |"D7" f3 | e2 d | f3 | e2 d |"G" g3/2 g/ g | 
 g z z |]  