Create a composition based on the provided motif, following the specified musical structure.
X:1
L:1/8
Q:1/8=180
M:12/8
K:G
['E2 A ABA G2 A Bcd e2', 'A2 d efe efe ded dcd e2'  
X:1
L:1/8
Q:1/8=180
M:12/8
K:G
"^A dorian" D | E2 A ABA G2 A Bcd | e2 B dBA G2 G F2 G | E2 A ABA G2 A Bcd | e2 B d2 B A3 A2 :| 
[K:D]"^A modal" d | efe efe ded dcd | e2 A B2 A G2 G F2 G | E2 A ABA G2 A Bcd | efe dcB A3 A2 :|  