There are 3900 workers in the three main buildings downtown. Twice as many people work in the largest building as in the smallest of the three. There are 500 more workers in the second-largest building than in the smallest building. How many workers are in each building?