Compose a musical piece that incorporates the given motif and adheres to the specified form.
X:1
L:1/8
Q:1/4=112
M:4/4
K:G
['B |O d3 e d>Bg>B dBgB aAAB', 'D>GB>G A>GB>G', 'B d3 e d>Bg>B d>Bg>B aAAB d^cde', 'g d>gb>g a>gb>g d>gb>g a>ge>g d>gb>g a>gbg'  
X:1
L:1/8
Q:1/4=112
M:4/4
K:G
"^Allegretto" B |O d3 e d>Bg>B | dBgB aAAB | d^cde dBgB | ABcB ABGG :: B | D>GB>G A>GB>G | 
 D>GB>G A>GA>B | D>GB>G A>GB>G | D>ED>A, B,G,G,G | D>GB>G A>GB>G | D>GB>G A>GEc | (BAGF) (GFED) | 
 E>FGA BGG :: B | d3 e d>Bg>B | d>Bg>B aAAB | d^cde dBgB | ABcB ABGG :: g | d>gb>g a>gb>g | 
 d>gb>g a>ge>g | d>gb>g a>gbg | d>edc BGG g | d>gbg a>gbg | d>gbg a>gea | .b.a.g.f .g.f.e.d | 
 .e.f.g.a bggbO ||  