Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
Q:1/8=180
M:4/4
K:G
['EFGB AGAB cded cABG EFGf efge', 'gedB BA'  
X:1
L:1/8
Q:1/8=180
M:4/4
K:G
"^A dorian" ABAG EFGB | AGAB cded | cABG EFGf | efge aA A2 | EA A2 EFGB | AGAB cded | cABG EFGf | 
 efge aA A2 || c2 gc acgc | BG G2 Bcdg | ecgc acea | gedB BA A2 | agea gedB | cBcG EFGB | 
 AGAB cdea | gedB BA A2 |]  