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=80
M:4/4
K:none
['c2{d} A2{GAG} A2{g}'  
X:1
L:1/8
Q:1/8=80
M:4/4
K:none
{g} eg |{ag} a2{g} agageg |{ag} a2{g} agagef |{gf} g2{a} g{f}gfgag |{gfg} f2 d2{G} d2{g} eg | 
{ag} a2{g} agageg |{ag} a2{g} agagef |{gf} g2{a} g{f}gfgag |{gfg} f2 d2{G} d2{g} ed |]: 
{g} cAcA{gBd} B2{g} ed | cAcA{gGd} G2{g} ed | cAcA{gBd} B2{g} ed |1{gcd} c2{d} A2{GAG} A2{g} ed :|2 
{gcd} c2{d} A2{GAG} A2{g} Bc |]:{d} cdecBcdB |{d} ABAfgf{gef} e2 | cd{g}ecBcdB | 
{gcd} c2{d} A2{GAG} A2{g} Bc :|  