Sexist slurs referring to female dogs and prostitutes, with a few letters replaced by asterisks. Crude references to bodies and sex. Cracks about racial and ethnic groups.

Those were some of the glaring problems with the initial version of the 2015 St. Albans School yearbook. Other boorish and disparaging messages in that edition of the Albanian were hidden in layers of code.

But they were decipherable to insiders at the elite all-boys school in Washington and to students at the neighboring National Cathedral School for girls who were targets of much of the purported humor.

Now, some graduates of the schools find echoes between the 2015 incident and a Georgetown Preparatory School yearbook produced three decades earlier. The 1983 publication is being scrutinized for often-cryptic references that Supreme Court nominee Brett M. Kavanaugh and his classmates made to beer, partying and women. Kavanaugh graduated that year from the all-boys Catholic school in Montgomery County, Md.

“There are many similarities,” said Talley Snow, a 2015 graduate of National Cathedral who was president of the student government there. “The cycle continues.”

Snow said that during her senior year, she and other students met with leaders of St. Albans and National Cathedral schools to alert them to inappropriate behavior and language of many boys. But she said the yearbook showed that those efforts yielded little change.

One page devoted to girls at National Cathedral was headlined “NSAD — No Students After Dark.” Several graduates from the two schools that year told The Washington Post that the acronym also stood for “No Stus After Dark.” The meaning of that phrase is unclear. But “Stus,” they said, was commonly known as a coded shorthand for two words: “stupid” plus a sexist slur.

Jason Robinson, headmaster of St. Albans since July, acknowledged that the first 2015 yearbook “was truly reprehensible, and it was a source of great embarrassment to the school.” He said the school, which that year issued a revised version, has beefed up oversight of the publication and taken steps to promote a culture of respect and civility. “We have always aspired to be a school that takes character education seriously,” Robinson said.

The national debate over the Kavanaugh nomination has cast a spotlight on all-boys schools. Two women have accused the nominee of sexual assault during his high school and college years. Kavanaugh denies the allegations.

Kavanaugh also has been forced to explain phrases on his Georgetown Prep yearbook page such as “100 Kegs or Bust” and “Renate Alumnius,” which refers to a woman with that first name who attended a nearby school.

Critics said Kavanaugh and other classmates alluded to her in the yearbook as a way of bragging about a conquest. The woman, Renate Schroeder Dolphin, recently told the New York Times the “insinuation is horrible, hurtful and simply untrue.” Kavanaugh told the Senate last week the reference was “clumsily intended to show affection” and that he meant no sexual connotation.

Educators are mindful that the Kavanaugh controversy provides lessons for their students.

“We are at an inflection point as a culture on issues of consent, sexual misconduct and treatment of women,” Robinson said.

He addressed St. Albans students about those issues after the Senate hearing that featured dramatic testimony from Kavanaugh and one of his accusers, Christine Blasey Ford. Robinson said he rejects the notion that “boys will be boys” as a defense for misconduct. “That is the very last message we want the boys to hear right now,” he said.

Last week, St. Albans and National Cathedral school officials told parents and alumni they have learned of allegations of sexual harassment and assault that involved students who attended their schools in years past. Both schools said they were “deeply concerned” about the reports and were seeking to learn more.

The two schools are on the grounds of Washington National Cathedral in Northwest Washington. For more than a century, the Episcopal schools have taught children of the powerful and prominent in the nation’s capital.

Each enrolls nearly 600 students from grades 4 through 12, with tuition of more than $40,000 a year for those not on financial aid. Boys and girls often socialize together, take classes together and participate together in performing arts and other activities. The symbiotic relationship forges meaningful connections, students and educators say, between the schools.

But it occasionally poses challenges.

In 2014, National Cathedral sophomores shared through an online Google document accounts “of unwanted sexual advances at parties, of inappropriate sexual comments, and of sexual and social behaviors that our schools do not condone,” according to a letter the girls school sent to parents that December. St. Albans also alerted parents to the issue and acknowledged that some of its students had posted responses to the online document that were “inappropriate.” The incident drew news coverage and roiled the community.

In 2015, St. Albans students on the yearbook staff assembled what would become a rogue version of the Albanian. It included standard pages about students, teachers and activities, as well as some that officials later said were decidedly not standard yearbook fare.

Photos of several offending pages were shown to The Post.

One featured a caricature of an Eskimo and pictures of 15 boys and a few girls. Graduates said the page appeared to suggest that the boys shared one of the girls as a sex object. Elsewhere, there were questionable references to people of various nationalities.

There were also veiled references to oral and anal sex, as well as a page headlined “When Pubes Be Strikin’.” Eight graduates interviewed by The Post, from both schools, cited other graphic and demeaning references, some targeting specific students, within the book.

“Blatant disrespect,” said 2015 National Cathedral graduate Hannah Loughlin. “Really hurtful,” said John Haywood, a 2015 St. Albans graduate.

Suzanne Woods, a veteran history teacher at St. Albans, said the yearbook came to her attention soon after it was handed out to seniors at the end of the school year. She recalled immediately alerting school officials, telling them: “I think there’s misogyny in the yearbook. It’s really bad. We need to stop it from being further distributed.”

Woods, now interim associate head of school, said the headmaster at the time, Vance Wilson, agreed. School officials asked the graduating class to return or destroy their copies. Then they revised it, working with faculty, and sent out a thinned-down version that summer.

The editor in chief of the yearbook, Deniz Dutz, posted apologies on Facebook and gave a written apology to the head of the girls school, Kathleen Jamieson, on behalf of the entire staff. Dutz wrote that he had not been aware of some of the offensive content but acknowledged that allowing it into the yearbook represented “a severe lapse of care on my part, which was unacceptable.”

Dutz declined further comment. He was not the only editor. Others were involved in producing the book, and graduating seniors were responsible for what appeared on pages devoted to them.

The yearbook faculty adviser at the time, Mark Bishop, remains its adviser. Bishop also apologized to Jamieson, a St. Albans official said. Woods said Bishop “wants to be part of the solution” and “works very hard at what is still a pretty thankless task.”

Bishop told The Post on Wednesday that Woods and Robinson “did a good job characterizing how the school’s flawed yearbook process has been improved since 2015.”

In June 2015, Wilson apologized in a letter to Jamieson for vulgarity in the 2015 Albanian that was “both readily apparent to adult eyes and coded for student eyes only.” He pledged to correct “slipshod supervision” of the yearbook.

“We lay blame on ourselves as adults for not exhibiting the necessary oversight so that a published book under our name so poorly represents the values of this school,” Wilson wrote.

Jamieson told The Post in a statement that her students brought the book to her attention. “I was deeply offended — infuriated — by the sexism and ignorance revealed by the boys who participated,” Jamieson wrote. “The book didn’t reflect the values of the St. Albans boys I know or their school.”

National Cathedral School officials said they were unaware of any complaints about the content of their own yearbook, called the Mitre.

Jamieson said she trusts that some good will come from the episode. “Already, I have had meaningful offers to help from alumnae around the country to support our current students as they grow,” she said. “St. Albans alumni have taken the time to note how much they admire and respect their [National Cathedral School] peers.”