Six days before the 2016 presidential election, two Haverford College students had an idea: They could try to get Donald Trump’s tax returns, which the then-candidate refused to release and which had become an election issue. Andrew Harris and Justin Hiemstra swiped into a school computer lab and tried to download Trump’s filings.

What began as a ploy by two computer-savvy college kids to get the tax returns the nation was buzzing about ended Monday in federal court in Philadelphia, where U.S. District Judge Cynthia Rufe said her probationary sentences for Harris and Hiemstra were intended to make an impression on them and “on anyone out in the public” who would seek to “abuse privileges and privacy of others.”

Harris, now 23, of Philadelphia, and Hiemstra, 22, of Minnesota, each was sentenced to two years’ probation and 200 hours of community service. They also must cooperate with a financial investigation by the probation office. Both men pleaded guilty this year to charges of accessing a computer without authorization and attempting to access information from the federal government. Tax returns are private documents.

“You didn’t get the candidate’s tax returns, but you’re going to hand over your own,” Rufe told Harris.

Harris’ sentence also included drug treatment, a mental health program, and letters of apology to affected students and the college.

At separate sentencing hearings, Harris and Hiemstra expressed remorse and apologized to other students whose passwords were used. Family members and friends sat in the courtroom.

According to prosecutors, Hiemstra and Harris tried to use the Free Application for Federal Student Aid (FAFSA) system to find the tax returns. The men used two other students’ credentials to log on to university computers on Nov. 2, 2016, planning to create a FAFSA account for a Trump family member.

Someone already had created a false Trump FAFSA account, which Hiemstra and Harris were able to hack by figuring out answers to security questions. Then they used Trump’s Social Security number, which recently had been made public, to try to get the tax records from the IRS. Multiple attempts failed.

“They knew exactly what they were doing,” said Assistant U.S. Attorney Anthony Wzorek at Harris’ hearing. “This wasn’t a lark; this wasn’t simply a stupid thing somebody did when they were in college.”

Prosecutors said the men lacked “self-awareness of the extraordinary advantages" they had in life and recommended the community service to cause each “to focus on people other than himself.”

Rufe gave Harris and Hiemstra stern warnings, but told them they showed promise and should go on to lead productive lives. Prosecutors did not ask the judge for prison time, although the maximum sentence could have included two years in prison.

“I wanted to know: Were you trying to be another Julian Assange?” Rufe asked Harris, referring to the WikiLeaks founder. “This is a pathetic attempt, you must know. But he’s no role model. You were meant to be a good, productive person.”

“I take total responsibility for my actions,” Hiemstra told the judge. The ordeal, along with current events, he said, had “made it ever more clear to me … how it is absolutely imperative for us to respect those foundational principles … that we are all bound by the same laws and no one is above the law.”

Hiemstra was a high-performing student interested in a career in security who completed a Fulbright-Hays scholarship. He graduated with a double major in math and Russian. With a Boren scholarship to study in Kazakhstan, he was set to begin a career path improving relations between the United States and countries of the former Soviet Union.

After his guilty plea, Hiemstra lost the scholarship. He “has already felt punishing consequences of his conduct,” his attorney said.

Harris’ attorney, William J. Brennan, said Harris had lost direction after the death of his father, but has found a passion for his job at a major pizza chain. Harris’ uncle and brother also spoke on his behalf. Harris was forced to leave Haverford in October 2017 after selling drugs to another student, according to the U.S. Attorney’s Office.

“I’m so grateful I got this wake-up call,” Harris told the judge. “I was able to turn my life around, and I really love my job.”

Both men’s attorneys said they were pleased with the sentences.

“At no time did my client harbor any ill will toward the president or his family,” Brennan said after the sentencing, “and he apologizes to the president.”

» READ MORE: Haverford student, 22, who hacked the IRS for Donald Trump’s tax returns, pleads guilty

Trump declined to release his tax returns when running for president, although his opponent, Hillary Clinton, released hers. Trump has since been subpoenaed for the records by members of Congress and New York prosecutors. Last week, the Supreme Court said it would decide whether Trump had to turn over financial records.

This story has been updated to correctly identify Hiemstra’s scholarship as a Fulbright-Hays Scholarship.