Marques Davis kept moving the items on the floor next to his prison mattress - stacking toilet paper, books, a water pitcher and a cup and then disassembling the stack.
He moved and stacked the items again. And then again.
Then, he drank his own urine from a urinal, reports Washington Post.
The bizarre behavior was captured by a surveillance camera in an isolation cell in the Hutchinson Correctional Facility, northwest of Wichita.
Months earlier, when he was still lucid, Davis told the Kansas facility's doctors that something was terribly wrong with him.
"It feels like something is eating my brain," he said in December, according to court records.
Davis died April 13, just days after the surveillance camera recorded him acting disoriented in his isolation cell.
An MRI done at the facility showed widespread fungal infection throughout his brain.
A CT scan conducted later at a hospital revealed it was so swollen that the upper part of Davis's brain was forced down to the lower part.
The 27-year-old's death is now the subject of a lawsuit that accuses the Hutchinson Correctional Facility's private health-care providers of dismissing the inmate's symptoms as they quickly progressed, causing Davis to suffer a "staggeringly slow, physically and mentally excruciating death."
The suit, filed last week by Davis's mother in federal court in Kansas, names the prison's health-care provider and 14 doctors and nurses as defendants and seeks unspecified damages.
It's the latest in a long line of controversies involving one of the largest correctional health-care providers in the country: Corizon Health. Corizon, which contracts with more than 500 jails and prisons in more than 20 states and rakes in at least $1.4 billion (NZD $20billion) annually, has been plagued with accusations that it fails to meet basic medical needs, leading, in some cases, to inmates' deaths.
Over the past few years, Corizon has paid millions of dollars to settle lawsuits filed by inmates and their families.
The allegations have placed the Tennessee-based company under scrutiny and resulted in lost contracts with several states.
In Kansas, Corizon provides health services to all adult and juvenile prisoners. The Hutchinson facility is one of the state's nine adult prisons. Neither the facility nor the Kansas Department of Corrections is named in the lawsuit.
Davis, who was serving a 53-year sentence for attempted murder and aggravated battery, seemed healthy before he slowly deteriorated over an eight-month period.
Headaches, back pains and numbness on his right leg sent him to the facility's infirmary dozens of times last year, according to the federal complaint.
By spring, he'd lost much of his weight and his ability to walk, according to the lawsuit.
His speech was confused and slurred, his hands and fingers were stiff, and his arms shook uncontrollably.
He once passed out while trying to make a phone call. Days before he died, Davis was urinating and defecating on himself, the complaint says.
"Every week that I went to visit, it was one thing after another," his mother, Shermaine Walker, told The Washington Post.
She said she called the infirmary almost every day for months, begging for someone to find out what was wrong with her son.
"They would tell me they looked at him and nothing was wrong with him," Walker said.
The lawsuit also alleges that medical staff dismissed the symptoms as phony. Several inmates had given written statements saying they had overheard nurses and doctors say Davis was faking his symptoms.
Corizon Health officials said in a statement that patient privacy laws prevent the company from sharing details about the medical services provided to Davis, but that they expect legal proceedings to reveal that Davis was appropriately cared for.
"It is important to emphasize that the existence of a lawsuit is not necessarily indicative of the quality of care or any wrongdoing, and that a legal complaint represents only allegations made by a plaintiff's attorney and selected information to support those allegations," said Martha Harbin, a spokeswoman for Corizon Health.
"We are first and foremost healthcare providers committed to providing the best possible care to our patients in a challenging environment in which to deliver healthcare."
A spokesman for the Kansas Department of Corrections declined to comment on the lawsuit.
Davis first went to the infirmary in July 2016 complaining of back pain and numbness on his right foot and leg.
A physician determined that the symptoms were caused by blood pressure medication, which was then stopped, court records say.
But the symptoms worsened, and Davis was later given a walking cane to help him get around.
At one point, medical staff gave him Tylenol for his back pain and ordered a lumbar X-ray. Last October, a physician documented that Davis's limping was "very visible" and that he was showing "neurological deficits."
By December, the inmate's symptoms included dizziness and hot sweats. Davis asked for a wheelchair, but his request was denied, the complaint says.
Davis was given Prednisone for 10 days after he passed out in January while trying to make a phone call.
A correctional officer took him to the infirmary the following month because his eyes were moving erratically. He was back shortly after with the same symptoms and was discharged 23 hours later, the complaint says.
Near the end of March, Davis was rushed to the clinic. His fingers were stiff and bent in abnormal directions, and his arms were shaking, the complaint says.
He'd also lost some vision from his right eye. Davis was discharged on the same day, only to be brought back hours later after he was found lying on the floor of his cell.
He was later moved to the isolation cell. By then, he was acting erratically and needed help to use the toilet, the complaint says.
Tests were conducted, including an electrocardiogram, electromyography and lumbar spine MRI, in the months before Davis's death, but the results were normal, according to the complaint.
Records also show several instances in which Davis refused tests and medications, although it's unclear why.
An attorney for Davis's mother said a brain MRI, which showed widespread infection, was not conducted until April 11. By then, it was too late for treatment, said the lawyer, Leland Dempsey.
Davis was hospitalized - but only after he went into cardiac arrest the following day, the complaint says.
By the time a CT scan revealed swelling, Davis was brain dead. He was taken off life support two days later. An autopsy revealed that a type of yeast that causes fungal infections was found in his cerebral cortex. The infection attacked Davis's lungs, liver and kidney.
Walker said the last time she saw her son, who has a 9-year-old daughter, was during a visit two weeks before he died. He was so incapacitated that inmates had to carry him "like a rag doll." Davis knew then that he would die, his mother said.
"He was able to talk and basically tell me that he loved me. He kind of knew at this point," she said. "I'm a mother that loves my child. It doesn't matter what he's in there for.
"I asked them for help, and they didn't give it to me, and it's obvious that they didn't give it to me because I don't have my child."
Corizon had entered into a contract with the Kansas Department of Corrections to provide health services to the state's 10,000 adult and juvenile inmates.
The contract pays $70 million (NZD $101m) a year, which is expected to rise to about $83 million (NZD $120m) within the next five years as the prison population increases, the Kansas City Star reported.
In recent years, the company has lost contracts with prisons and jails in several states, including Maine, Maryland, Minnesota, Pennsylvania, Tennessee, Florida, Georgia and New Mexico, because of complaints about inadequate health care and inmate deaths.
The company lost a contract with New York City's Riker's Island Prison Complex after a report found that Corizon hired staffers with criminal records.
In 2012, a federal judge unsealed a report saying patients at the Idaho State Correctional Institution in Boise received substandard care and faced cruel and unusual treatment under the company.
Corizon and prison officials issued statements calling the report "misleading and erroneous."
Since at least 2015, Corizon Health has paid out millions of dollars in lawsuit settlements in at least three states.
Corizon and Alameda County, Calif., agreed to pay $8.3 million (NZD $12m) in 2015 to the family of an inmate who was beaten to death by jail staff.
It's the largest settlement of its kind in California, according to media reports.
The company paid more than $4.5 million (NZD $6.5m) in 2016 to dozens of New Mexico inmates who accused a Corizon physician of sexually abusing them.
And in April, Corizon agreed to pay $1.7 million (NZD $2.4m) to about 1,800 current and former Florida inmates who were denied medical care for hernias.
Corizon became the Kansas prison health-care provider in 2013. The 18-month contract is renewable every two years.
In light of the most recent lawsuit, Kansas Senate Minority Leader Anthony Hensley (D) said the state should consider ending its contract with Corizon.