Construct melodic segments by incorporating the provided motif with the designated musical pattern.
X:1
L:1/8
M:4/4
K:D
['d2 cd AF Dd cdAF DFGF', '^ga fdAa'  
X:1
L:1/8
M:4/4
K:D
|: z | d2 cd AF Dd | cdAF DFGF | EB, B,2 GFED | CDEF GABc | d2 cd AF Dd | cdAF DFGF | E2 gf ed cB | 
 (3ABA (3GFE D2 z :: a | ^ga fdAa ^ga | fdAa ^ga=gf | eB B2 bagf | ed cBAB cA | d2 cd AF Dd | 
 cdAF DFGF | E2 gf ed cB | (3ABA (3GFE D2 z :|  