The classroom windows offered bleak winter views of razor wire and walls encircling the state prison at Lino Lakes.

But the new graduates wore caps and gowns and smiles. They were focused on the certificates in their hands, and what comes next.

Nineteen men had just qualified as peer support specialists — training that would help them help others, drawing on their firsthand experience with addiction, incarceration and recovery.

One by one, the graduates shared their stories. The 19-year-old who was 17 when he came here, 13 when he had his first encounter with the justice system, 9 the first time he used drugs.

The 41-year-old who was 17 when he arrived. A lifer, using that life to try to help others.

Sidney Monette sang.

"Mitákuye Oyás'iŋ." All my relatives, said Monette, who was convicted of robbery, after singing a Dakota healing prayer. "I will never tell you that recovery is easy."

But, he added, "it's totally worth the struggle."

Shawn Hawley worked with a peer support specialist when he began his own recovery. For him, working to help others was an empowering experience after struggling with homelessness, mental health problems and a conviction for burglary.

"After the selfishness of addiction, this is the opposite of that," Hawley said. "It's being an advocate of hope. We're saying we love; we care. We're not who we were. We're the best version of who we're going to be."

A federal grant allowed the state to offer this training at facilities across the state. Staff from the St. Paul-based Minnesota Recovery Connection taught the class at Lino Lakes. This is the fifth graduating class at the fourth state prison. At each facility, 80 or so applicants vied for 20 or so seats in the classroom. Only participants with unblemished conduct for the past six months earned a spot. The chosen few learned how to communicate and, more importantly, how to listen to each other.

"I was a taker for most of my life," said one graduate who did not want to be identified by name, who has been in and out of the justice system for 30 years. He's been in recovery for the past five. "Ironically," he added. "It took coming to prison to learn about integrity, empathy."

The challenge for any prison recovery program is to take people who are sober by circumstance — because they're incarcerated — and give them the skills and support to help them stay sober by choice once they return home.

There are more educational and treatment programs at Lino Lakes than anywhere else in the correctional system, including the TRIAD program, which offers treatment and support to men with substance abuse disorders and which hosted the training.

If all of this sounds expensive, consider the cost of doing nothing and helping no one.

Locking someone away costs American taxpayers around $40,000 per incarcerated person per year. Almost everyone incarcerated in Minnesota will be coming home some day. Every class, every treatment program, every support service while they serve their time is an investment by the state.

Minnesota knows it can help. For decades, voluntary programs like the Challenge Incarceration Program have offered classes, substance use treatment, counseling and rigorous boot camp-style physical training — and, by the state's estimate, cut the rate of re-offenses by as much as a third.

This was a weeklong course, but the caps and gowns and graduation cake at the ceremony signaled just how much work all of them put in.

"This is my first time graduating from anything," one participant said, beaming.

The certification they earned this week will allow them to work with their peers inside Lino Lakes. It will also qualify them to pursue careers in peer recovery support once they leave.

The Department of Corrections estimates that 90% of the people incarcerated by this state have been diagnosed with substance abuse disorders. Helping people into treatment and recovery helps everyone in Minnesota.

"I'm a justice-involved person myself," said program instructor Justin McNeal, who serves as director of justice-involved programs at Minnesota Recovery Connection. "Nothing changed for me before getting in recovery."

In recovery, the hard times you survive can be an asset, he said. Peer counselors can take experiences that used to be a source of shame and turn them into tools to help others.

"You have to deal with the consequences of your actions. But you are not that," said Caddy Frink, director of programs at Minnesota Recovery Connection. "You're someone who's on the other side of that."

As the graduates gathered for class photos, Frink suggested they say "recovery" instead of cheese.

Because recovery, she said, ends with a smile.