Imagine the poorest parts of the inner city where every building is smothered in graffiti - except the school. Where boys who left with no qualifications take time off from gang life to teach younger pupils to breakdance, paint or play football. Where violence, drugs and child prostitution hold sway on the outside, but where calm and solitude reign in class.
Such factors impressed a group of headteachers from Lewisham in south-east London on a visit to Brazil which left them deeply moved.
Before they left London, some had wondered what Latin America's most populous country with its legacy of poverty, illiteracy and urban misery might teach them. According to Margaret Ayres, head of Rangefield primary school, they returned "humbled, enlightened, energised".
They observed that Brazil is far ahead of Britain in appreciating children's emotional needs, often putting social and welfare needs higher than pure academic ones. They were particularly impressed by the emotional bonds between teacher, pupils and community.
Interestingly, it is precisely this emotional climate in the classroom that is highlighted in a recent Unesco report as the most important factor influencing student performance.
In Brazil, teachers are trained to create an atmosphere that encourages learning and helps pupils to recognise, develop and control the expression of emotions. In part this is done by simply being friendly, welcoming, accessible.
"They treat everyone with a light touch, greeting people with a smile, welcoming people and being happy. Love comes through very strongly," says Evelyn Holdsworth, head of Our Lady of Lourdes primary school in Deptford.
Moreover, personal-values education and citizenship are integral to the school ethos in Brazil, not "bolted on" in citizenship and PSHE classes, as they are here. Pupils learn because they want to please the people they like. They turn to art instead of daubing graffiti, to music and dance instead of vandalism. They value their school as a community centre.
"It was a real eye-opener," says Ms Holdsworth. "Why do we treat children the way we do in this country? We tend to be disapproving and negative."
The visit was organised through the International Placements for Headteachers scheme run by the British Council and the National College for School Leadership for the Department for Education and Skills.
In Sao Paolo, South America's largest city, all schools open at the weekend as part of the emotional education programme. Music, dance, art and sport has become an integral part of the curriculum. Teachers are trained to deal with problems such as drugs and abuse. Every school has its own speech and language therapist, a health visitor who provides nutritional advice and health cares, and a social worker. Schools are thrown open to parents, former pupils, who come back and teach, and the community at large.
"It moved me to tears, the way the head brought ex-pupils back into the school as positive role models," says Margaret Ayres. "They were a resource for the school rather than a threat."
Violent incidents in schools dropped by 80 per cent in Sao Paolo within a year of it starting the emotional education programme. "It seemed to us that Brazil has been able to keep a lot of violence and aggression out of schools, even though there is a lot of aggression in these children's lives," says Evelyn Holdsworth.
International Placements for Headteachers: www.britishcouncil.orgeducationheadteachers