Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
M:4/4
K:G
['D G2 G2 G3 B AG ED', 'BB/B/ BD GB A2 F2'  
X:1
L:1/8
M:4/4
K:G
|: D |"G" G2 G2 G3 B | AG FE"D" ED DF | A2 A2 A3 F |"G" GA BA G3 ::[M:2/4] z |"G" BB/B/ BB/B/ | 
 BD GB |"D7" AA/A/ AA/A/ | AD FA |"G" BB/B/ BB/B/ | BD GB |"D7" A2 F2 |"G" G3 :|  