Construct melodic segments by incorporating the provided motif with the designated musical pattern.
X:1
L:1/8
M:9/8
K:G
['BcA BGG', 'd gag'  
X:1
L:1/8
M:9/8
K:G
|: D | GBd gdc BAG | B/c/dB cAA A2 D | GB/c/d gdc B2 G |1 BcA BGG G2 :|2 BcA BGG GBd || 
 gag efg afd | gag efg a2 d | gag bag fed | efg agf g2 d | gag efg afd | gag efg a2 a | 
 bag agf g/f/ed | efg afd g2 ||  