After 1001 nights, the Great King of Persia, Shahryar, decided not to execute Queen Sheherazade if she passed one final test. The King had 24 children under the age of 10 with an even number of children for each age.
He ordered that 24 chairs be put along the wall. Each time he put a child in an empty chair, Sheherazade was to put a child in any other empty chair. After all the children were placed, the 24 digit number formed by their ages had to be divisible by 1001.
Can you help Sheherazade to stay alive?