Formulate melodies by adhering to the specified pattern and supplied motif.
X:1
L:1/8
M:4/4
K:G
['A>F (3DEF G2', 'G2 B>c d>BG>B d>BG>B e2 e2 (d2'  
X:1
L:1/8
M:4/4
K:G
|: G>A | B>GA>G A>F (3DEF | G2 G>F G2 A>G | E>AA>B c>BA>G | (3ABA G>B A2 A>B | c>ec>A B>dB>G | 
 A>BA>G E2 D2 | B>AB>G A>F (3DEF | G2 G>F G2 :: B>c | d>BG>B d>BG>B | e2 e2 (d2 e2) d>f | 
 g2 e>d B>GB>d | (3gag f>a g2 e>f | g>ag>f e>fe>d | B>AG>B A>F D2 | B>AB>G A>F (3DEF | G2 G>F G2 :|  