Thirteen-year-old Hassan may have committed atrocities for the Islamic State group, but instead of jailing him immediately, the Kurdish authorities in northeastern Syria enrolled him in a rehabilitation centre.
He was one of around 80 teenagers sporting trainers and tracksuits as they filled their lungs with chilly morning air in the courtyard of the Hori Centre in Tal Maarouf.
Aged 12 to 17, they had all been detained by Kurdish fighters or the US-led Western forces who supported them during the battle to destroy the jihadists' self-styled "caliphate".
Some are children of IS families, whose parents may be in jail, while others were directly recruited -- forcibly or voluntarily -- by the jihadist group.
After their capture, they were selected for "rehabilitation" in line with the "second chance policy" of the Kurdish Democratic Union Party (PYD) which controls the region.
Local officials admit their prisons are full and say they are hoping a constructive approach can help mend ties with local tribes that once backed the jihadists.
It was early 2018 when Hassan checked into the Hori Centre, months after the opening of the sprawling complex of red-brick rooms and dorms framing a rectangular lawn.
As the son of a senior IS commander in the Syrian city of Raqa, once the de facto capital of the jihadists' proto-state, he regularly witnessed beheadings.
The Kurdish forces who captured him found a picture that shows him proudly holding a severed head, but whether the boy ever killed anyone himself isn't clear.
"When he arrived, like many of them, he didn't say hi, didn't shake our hands and didn't look us in the eye," said Roka Khalil, one of the centre's two directors.
The centre is run by two secular women and its boarders are asked to shave and give up their traditional garments for Western-style clothes.
Moving there was a culture shock for Hassan.
Like other teenagers IS called the "cubs of the caliphate", he had been subjected to the group's efforts to impose its brand of violence and religious conservatism on an entire generation.
Now, some of those youngsters are housed in dormitories where they have no access to phones or the internet but where staff are available day and night, said Abir Khaled, the centre's co-director.
"We consider them as humans, as victims of the war," she said.
While most of the children are Syrian, the centre also hosts former "cubs" from countries including Turkey and Indonesia.
Their days follow a strict routine that includes a lot of sport, particularly volleyball, various chores on the compound and workshops training them to become barbers and tailors.
Also central to the rehabilitation process is a curriculum that includes history, geography, Arabic and Kurdish classes, as well as a "morality" class.
Many have experienced poverty, received very little education and grew up in tough family environments.
Four of them were dispatched by IS to carry out a suicide operation but surrendered instead, according to the centre's staff.
"It shows that their ideology is not that deep, and can be easily fixed," said Khalil.
Music replaces 'paradise'
A third of the Hori Centre's "guests" have been sentenced to prison terms ranging from six months to seven years, but Kurdish authorities believe they can be rehabilitated if they are given a supportive environment.
If their conduct is good at Hori, their sentences may be reduced and they could be released to their families within months.
Hassan is now awaiting trial and Khalil said he may be given a term of up to three years, although that could be reduced.
The Hori Centre's egalitarian and social values are directly inspired by those of the jailed leader of the outlawed Kurdistan Workers' Party (PKK), Abdullah Ocalan.
The charismatic leader, who has been imprisoned by Turkey since 1999, is the main ideological reference of the PYD, whose armed branch controls swathes of northern and eastern Syria.
Ocalan's portrait is plastered all over the region, where supporters see him as a visionary leader but his critics denounce him as a Marxist autocrat -- or even a terrorist.
The self-proclaimed Kurdish administration insists the Hori Centre is not designed to implant PYD ideology in the heads of its young boarders, replacing one brainwashing with another.
Yet at Qamishli's Alaya prison, which AFP was allowed to visit and where some of Hori's "patients" were previously detained, the wooden models carved by inmates were often in the image of Ocalan.
Khalil said it was too early to describe the centre's activities as a success, but stressed that results were already tangible.
"Today, lots of them come to talk to us by themselves," she said.
"Hassan doesn't insult his classmates any more when there is a dispute, he doesn't believe in paradise and the virgins any more, he even listens to music."