Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
Q:1/2=90
M:4/4
K:G
['DEFD G2', 'G2 d2 gfga gbag fefg fagf edef'  
X:1
L:1/8
Q:1/2=90
M:4/4
K:G
 (3(GFE) | DEFD G2 GA | BGBd cBAG | (FG)(EF) CEGG | AF dF E2 (EF) | DEFD G2 (GA) | BGBd efge | 
 dcBA GFGA | B2 G2 G2 :| d2 | gfga gbag | fefg fagf | edef gfed | d2 e2 e2 g2 | dBGB d2 cB | 
 cdef g2 (fe) | dcBA GFGA | B2 G2 G2 |]  