Construct a musical piece that follows the designated lettered structure and integrates the provided motif throughout.
X:1
L:1/8
Q:3/8=100
M:6/8
K:D
['B2 A B2', 'A2 B']  
X:1
L:1/8
Q:3/8=100
M:6/8
K:D
 z | d2 e d2 c | B2 A B2 A | B2 c d2 B | ABA AFD | d2 e d2 c | B2 A B2 A | B2 c dfa | gec d2 :: z | 
 F2 G A2 B | AFd dAF | A2 ^G A2 B | AFD E2 z | F2 G A2 B | AFd dAF | D2 E FGA | GEC D2 :|  