After five teenagers defaced a historic black schoolhouse in Virginia with racist and anti-Semitic graffiti last year, a judge handed down an unusual sentence. She endorsed a prosecutor’s order that they read one book each month for the next 12 months and write a report about it.

But not just any books: They must address some of history’s most divisive and tragic periods. The teenagers can read “Night,” by Elie Wiesel, to learn about the Holocaust. They can crack open Maya Angelou’s landmark 1969 book, “I Know Why the Caged Bird Sings,” for an unsparing account of the Jim Crow South. They can also dive into “The Kite Runner,” by Khaled Hosseini, a captivating tale about two boys from Afghanistan.

Those books were among the 35 works of literature that the judge, Avelina Jacob, ordered the unidentified teenagers, ages 16 and 17, in Loudoun County to choose from last week after they pleaded guilty to spray-painting the Ashburn Colored School, a dilapidated, one-room 19th-century schoolhouse that had been used by black children during segregation in Northern Virginia.

The teenagers’ sentence, known as a disposition in juvenile cases, also includes a mandatory visit to the Holocaust Museum in Washington and the Smithsonian’s Museum of American History’s exhibit on Japanese-American internment camps in the United States.