Problem 7. In the queue for the school cafeteria, 16 schoolchildren are standing in such a way that boys and girls alternate. (The first is a boy, followed by a girl, then a boy again, and so on.) Any boy who is followed by a girl in the queue can swap places with her. After some time, it turned out that all the girls are at the beginning of the queue, and all the boys are at the end. How many swaps were made