Develop a musical piece using the given motif and adhere to the outlined musical structure.
X:1
L:1/16
Q:1/8=265
M:2/4
K:D
['', 'f4 fgfe d2f2', 'd2ef g2e2 B4 gfed c2A2', 'af (3def'  
X:1
L:1/16
Q:1/8=265
M:2/4
K:D
 d2e2 |: f4 fgfe | d2f2 A2>d2 | c2e2 A2ed | c2f2 A2>d2 | f4 fgfe | d2f2 A2>e2 | c2e2 B2c2 | 
 d4 d4 :| a2>f2 d2ef | g2e2 B4 | gfed c2A2 | d2f2 a2fg | abaf d2ef | g2e2 B4 | gfed c2A2 | 
 d4 defg :| af (3def af (3def | c2e2 B4 | ge (3cde ge (3cde | d2f2 a2(3efg | af (3def af (3def | 
 c2e2 B2ef | g2e2 c2e2 | d4 d4 :|  