Develop a musical piece using the given motif and adhere to the outlined structure.
X:1
L:1/8
M:4/4
K:G
['AG AcBA G2 GA', 'g2 fg'  
X:1
L:1/8
M:4/4
K:G
 gf | efed BedB | (3ABA AG AcBA | G2 GA BA (3Bcd | e2 A2 A2 Bd | efed BedB | A2 AG AcBA | 
 G2 GA BdAc | B2 G2 G2 :: GA | BABd g2 fg | agfg edBd | g2 fg ed (3Bcd | e2 A2 A2 Bd | 
 (3efg af g2 ge | dBAG AcBA | GFGA (3Bcd Ac | B2 G2 G2 :|  