Develop melodies according to the outlined musical structure, including the given motif.
X:1
L:1/8
M:2/4
K:G
['B,2 EF G2 FE F2 Ad F2', 'E3 d2 AG F3 defd A F2'  
X:1
L:1/8
M:2/4
K:G
 B,2 EF | G2 FE | F2 Ad | F2 D | E2 GA | B3 | d2 AG | F3 | B,2 EF | G2 FE | F2 Ad | F2 D | E2 B | 
 A2 FD | E3 | E3 || d2 AG | F3 | defd | A F2 | gfeg | B3 | efge | B3 | B,2 EF | G2 EF | F2 Ad | 
 F2 D | E2 B | A2 FD | E3 | E3 ||  