Develop a musical piece using the given motif and adhere to the outlined musical structure.
X:1
L:1/4
M:2/2
K:D
['B A', 'f3 d d e f g4 e'  
X:1
L:1/4
M:2/2
K:D
 A |"D" d A B A | F F2 A | d A B A |"A" E4 | c A B A | c c2 B | A A B A |"D" D3 A |"D" d A B A | 
 F F2 E | D D E F |"G" G4 |"A" e e2 d | c c2 B | A A B c |"D" d4 |] |"D" f a/f/ e d | f f3 | 
 f a/f/ e d |"A" c4 | a a/a/ a a | g g3 | e c B A |"D" f4 |"D" f a/f/ e d | f f3 | d d e f | 
"G" g4 |"A" e e2 d | c c2 B | A A B c |"D" d3 |]  