AL-BAB - On the walls of a former Islamic State group jail, Syrian detainees whiled away endless months by scrawling phrases and poems, praying for freedom or bidding farewell to loved ones.
One former prisoner of the jihadists, Khalifah al-Khidr, returned to his cell in Al-Bab's jail two weeks after the northern town was wrested from IS by Turkish-backed rebels.
Dressed in a black fleece and cap, Khidr, 23, looked at ease while outside in the courtyard but was gripped by fear as soon as he stepped inside the three-storey building.
For the first time since his six-month imprisonment in 2014, Khodr descended into a dark hallway, its walls tagged with names, dates and religious verses in multi-coloured script.
"Most prisoners wrote on the walls to leave a trace, to show that they're still alive," the tanned young man said.
Since Syria's conflict erupted in 2011, tens of thousands of people have been detained by government forces, rebels, and jihadists -- in many cases their fate unknown to this day.
"Prison is an honour. Shackles are my anklets, and the balango, the swing of heroes," reads one phrase.
The "balango" is a torture method notorious across Syria, by which a victim is hoisted up into the air by the hands and left there for many hours.
Another prisoner, perhaps afraid of being forgotten after days holed up in the prison's abyss, wrote: "If the days pass and you don't see me anymore, here is my signature. Remember me."
- Write to 'pass the time' -
For others, a single, pained word was enough: "Injustice."
Before it was a prison, the building was a local administration centre, complete with a temporary detention centre.
When the Islamic State (IS) group took it over from Syrian rebels, it turned the building into a jail and used a nearby complex -- reachable by tunnel -- as a religious tribunal.
As many as 100 prisoners would be crammed into the tiny cells, said Khidr, who had worked as a citizen journalist opposed to both IS and Syria's regime before he was detained.
"When I was in prison, I would dream of nothing," he said, speaking slowly and deliberately as he scanned the walls.
Instead, detainees sketched their dreams on cell walls: a dove taking flight with the caption, "She wants to fly," or the phrase "Freedom of the press."
Suddenly, Khidr's eyes locked onto something he himself had scrawled onto the wall on June 3, 2014 -- the first week of his imprisonment.
He pointed to the line, a verse by celebrated Palestinian poet Mahmoud Darwish: "On this earth is what makes life worth living."
"The phrases on these walls can give hope to relatives" worried that prisoners had disappeared, said Khidr.
For Alaa, another former detainee in Al-Bab, "every prisoner spends his first two weeks telling his whole life story."
"But then he has nothing left to say, and he begins to feel deadly boredom. Everyone finds a way to pass the time," the 25-year-old said via the internet.
- 'Some hope to die' -
Over the course of months, "each prisoner loses his sense of time and starts to mark the number of days that have passed" on the wall.
Alaa, who scrawled his own name on the prison wall in late 2013, recounted how detainees furtively got their hands on some writing tools.
"One day, IS guys asked for volunteers to clean a huge room full of Syrian government documents and property deeds," he said.
"As we cleaned, we found a box of coloured pencils and snuck them out."
But it was not just during IS's rule that prisoners scribbled on the walls: some of the dates marked are more than a decade old.
"These walls knew several generations," Alaa said with a wry smile.
But the detention and torture methods have remained the same.
Some individual locker-sized cells were known as "coffins": rectangular cabinets where a single inmate could barely fit in vertically.
But the worst were the "doghouses," square cupboards where prisoners could only fit if they knelt into contorted shapes.
"They stayed like that for 40 days, and they even put diapers on so they could do their business since they were not allowed to go out... Some would hope to die," said Khidr.
But two years after his own lucky escape from prison, Khidr said: "Today, I am here of my own free will, in this place where I could have died at any moment."
Behind him, a message in red ink signed by prisoner Abu Adib reads: "All doors are shut, except yours, God."