(CNN) -- They were living in hell, and Ariel Castro did all he could to make sure they'd never escape it.
He tied and chained them up, removed handles from doors and replaced them with padlocks. He rigged entrances to the house with makeshift alarms, threatened them with a gun and fed them only once a day.
He covered windows to keep them out of view and sunlight out of their rooms.
But Michelle Knight, Amanda Berry and Gina DeJesus focused on the light at the end of the long, dark tunnel.
They nurtured the faith that they would one day be free. They clung to each other. They persevered and emerged from years of hell to find new life.
In their rare public appearances since, people have expressed surprise over how intact and at times cheerful they appear after all they have been through.
Frank Ochberg, a pioneer in trauma research who testified in the case Thursday, lauded the three women's survival and coping skills as "marvelous, compelling examples of resilience."
Ochberg testified when Castro was sentenced to multiple lifetimes behind bars.
Resilience. It's that state of mind that allows people to survive natural disasters, wars, the loss of whole families, even torture, and keep on living and eventually, hopefully, thrive.
"It means bouncing back," says the American Psychological Association.
On Thursday, Knight took a brave step in that direction.
She endured Castro's torment the longest. It has been said that, of the three women, she has had the roughest recovery so far. The accounts of the abuse Castro doled out to her were some of the most shocking.
When he made her pregnant, he pounded her belly, the women have said, until she miscarried. He has steadily denied the accusation.
She bravely walked into a Cleveland, Ohio, courtroom Thursday to face her tormenter, cast off the shackles of 11 years of his torture and sexual abuse, and wish him a life in hell.
Castro kidnapped her in 2002, when she was 21. He tore her away from her little boy, who was age 2 at the time, for what felt like forever.
"Days never got shorter. Days turned into nights. Nights turned into days. Years turned into eternity," she sobbed.
As she read her prepared solemn sendoff to Castro, tears drenched her face, filling one handkerchief after the next.
But she kept on. She let him know that while he descended into the depths of life in prison, she would emerge from this.
"I spent 11 years in hell, and now your hell is just beginning. I will overcome all of this that happened. From this moment on, I will not let you define me or affect who I am."
Taking hold of the situation and defining it for oneself is an important part of resilience, psychologist Rebecca Bailey told CNN's Anderson Cooper Thursday.
Knight and the others are developing "an understanding that you can move forward past these events," she said. They need to, so they can let go.
Resilience is "ordinary"
The strength in the face of their suffering may make Berry, DeJesus and Knight seem exceptional. But most of us are capable of the same spirit, the APA says.
"Research has shown that resilience is ordinary, not extraordinary." It points as an example to the large number of Americans who lost loved ones in the September 11, 2001 terrorist attacks and how they rebuilt their lives.
"Resilience is not a trait that people either have or do not have," the APA says. "It involves behaviors, thoughts and actions that can be learned and developed in anyone."
Some of what Knight said Thursday indicates that the three did that together.
The most important part of resilience is to develop caring relationships, the APA says.
In court Thursday, Knight credited DeJesus -- whom she shared a dark room measuring about 7 feet by 11½ feet -- for saving her life.
"I never let her fall, and she never let me fall," Knight said. "She nursed me back to health when I was dying from his abuse. My friendship with Gina is the only good thing to come from this situation."
She returned the favor, at a cost to herself.
She placed herself in between Castro and DeJesus, taking on physical and sexual abuse herself to protect her friend, Ochberg testified.
Being the oldest, Knight often served as doctor, nurse and pediatrician for Berry and her young child. She acted as the midwife, when it was born, delivering Berry's baby in a plastic swimming pool.
Look to the future
It is important to see a horrible situation as something you will get out of, the APA says.
Somehow, Knight, Berry and DeJesus kept hope. As Knight said, "We said we'll all get out alive some day and we did."
She has said that she wants to make a life helping others who have been in her situation. She wants them to "know that there is someone out there to lean on and to talk to."
"I'm looking forward to my brand new life," she said in a statement.
The pain does not simply disappear, the APA says. It recommends writing about the feelings and thoughts attached to the trauma. The women kept diaries on their torments.
It also recommends spiritual practice. Knight has turned to her belief in God to find comfort.
"Emotional pain and sadness are common in people who have suffered major adversity or trauma in their lives. In fact, the road to resilience is likely to involve considerable emotional distress," it advises.
"They have life sentences," said Ochberg of the girls' emotional state.
"I think they will -- with the love and support of the whole community -- they have a good chance to live a good life. But that doesn't mean that they'll ever be free of the damage that was done," he said.
While they're no longer locked up in the hell Castro built for them, it is still inside of them, and they may need to let some of it out.
CNN's Greg Botelho contributed to this report