Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
M:4/4
K:G
['G<DB<D G2 (3gag f<ee<d e<cA<G', 'G2 B<c (3ded B<d g<dB<d (3gfg b<f'  
X:1
L:1/8
M:4/4
K:G
 (3DEF | G<DB<D G2 (3gag | f<ee<d e<cA<G | (3FAF D<G F<GA<c | (3BAG A<F G<FE<D | G<DB<D G2 (3gag | 
 f<ee<d e<cA<G | F<Ad<B c<AF<G | (3ABA G<F G2 :: B<c | (3ded B<d g<dB<d | (3gfg b<f g<dB<d | 
 (3gag f<g e<d^c<d | (3efe d<^c d2 e<f | (3gag B<A (3BdB G<c | e<cA<G (3FAF D<F | G<Bd<B c<AF<G | 
 (3ABA G<F G2 :|  