Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
Q:1/2=90
M:2/2
K:D
['c BGAG FGAc BGAF BEEc BGAG FGAg', 'f>gaf g>abg'  
X:1
L:1/8
Q:1/2=90
M:2/2
K:D
 c | BGAG FGAc | BGAF BEEc | BGAG FGAg | fdec dD D :: g | f>gaf g>abg | fgaf beeg | f>gaf g>abg | 
 fdec dD D :|  