Develop melodies according to the outlined musical structure, including the given motif.
X:1
L:1/8
Q:1/8=150
M:4/4
K:G
['(3def gd d2 BGDC B,D (3GBd gd^cd', 'G2 Bd e2 BA G E3 B,EGB'  
X:1
L:1/8
Q:1/8=150
M:4/4
K:G
 (3def | gd d2 BGDC | B,D (3GBd gd^cd | cdBd AdGd | FGEG D2 (3def | gd d2 BGDC | B,D (3GBd gd^cd | 
 ecGE CGfe | (3ded (3cBA G2 :| Bd | e2 BA G E3 | B,EGB edfe | d2 AG F D3 | ^CDFA ^cdef | 
 g d3 BGDC | B,D (3GBd gd^cd | ecGE CGfe | (3ded (3cBA G2 :|  