Formulate melodies by adhering to the specified pattern and supplied motif.
X:1
L:1/8
Q:1/8=140
M:2/2
K:G
['GABc defd', 'bagf egfe edcB edef gfga bagf efga'  
X:1
L:1/8
Q:1/8=140
M:2/2
K:G
"^allegro con spirito" D2 | GABc defd | g2 fe d2 d2 | e2 E2 d2 D2 | c2 Bc ABcA |"^5" GABc defd | 
 gfed ^cbag | gfed A2 ^c2 | d6 :| fg |"^9" afga bagf | egfe edcB | edef gfga | bagf efga | 
"^13" bBbB aBaB | gBgB fBfB | edef gfed | e6 f2 |"^17" gfed cBAG | e2 d2 d2 D2 | c2 B2 A2 G2 | 
 FGAF D2 z2 |"^21" EFGE FGAF | GABG ABcA | d2 g2 bagf | g6 :|  