Develop a musical piece using the given motif and adhere to the outlined musical structure.
X:1
L:1/4
M:2/4
K:G
['e d', 'A2 B2 |{F} A2{E} G2'  
X:1
L:1/4
M:2/4
K:G
 d{ed} | ^c3/2 d/ e d | B3 B{cB} | ^A3/2 B/ c B | [Bd]3 G | (3F A c f e | (3D G B e d | 
 d F B3/2 A/ | G z [GB,] z!fine! ||[K:D]{F} A2{F} B2 |{F} A2{F} A2 |{A} g g B3/2 c/ |{d} f f A2 | 
{F} A2 B2 |{F} A2{E} G2 |{d} f f e3/2 d/ | c/a/^g/a/ e2 |{F} A2 B2 |{F} A2{E} G2 |{A} g g B3/2 c/ | 
{d} f f [FA]2 | ^A B c3/2 B/ | A/g/ f d3/2 B/ | A E G3/2 F/ | D z D!D.C.! |]  