Develop a musical piece using the given motif and adhere to the outlined structure.
X:1
L:1/8
Q:1/4=120
M:2/4
K:D
['d(c/d/) AA', 'd3 a a^g=gf eeef ggfe d(d/e/) dA'  
X:1
L:1/8
Q:1/4=120
M:2/4
K:D
"^A" A | d(c/d/) AA | fe/f/ d(e/f/) | gfed | cecA | d(c/d/) AA | f(e/f/) d(e/f/) | gedc | d3 :| 
"^B" a | a^g=gf | eeef | ggfe | d(d/e/) dA | Bcde | fgaa | bagf | f2 e ||  