Now and then they lose their hold and fall on to the bare concrete floor, on which about a dozen others sit. The walls are bare, too, except for peeling paint and for a blackboard, on which teacher Esther Kawasomi, 33, has written sums.
One-third of the class painstakingly copies the sums into exercise books, which must be bought by parents. Another third, without books, patiently waits until children from another class bring in some slates and chalk for them. The slates are so worn, the chalk no longer adheres. But still they try, wiping the slates energetically with their shirts. The remaining pupils sit quietly, accepting their situation with equanimity.
Bulindi Church of Uganda Primary School in Hoima district has 549 children on its rolls, ranging in age from six to18 (two boys have had to repeat the year more times than anybody can remember: most children complete primary level at 12 or 13). Whether they go on to secondary depends not only on whether they pass exams at the end of their final year but also on whether they can afford it: there is no compulsory education and all schools are fee-paying. Only two of the nine classes are streamed. The rest, says headteacher Sayuni Kyamanywa, "heap themselves".
The reception class is relatively small. Some have up to 80 children, but numbers fluctuate. Last year, at least 20 dropped out because they could not afford the fees (Pounds 2-Pounds 3 per annum), or the material to make uniforms, which costs about Pounds 6. There were also two deaths, from sickle cell anaemia and rabies. Nearly 60 were orphaned by Aids in nine months. The numbers vary wildly from the morning to the afternoon, too. Since there is no lunch, pupils go home at midday for 90 minutes. Most do not return and, until a clampdown by Mrs Kyamanywa, neither did many teachers.
Back in the class, the children queue patiently to have their sums checked. Outside, two boys can be observed dashing into the bush. They return in less than a minute, having relieved themselves in the time-honoured style that Mrs Kyamanywa is determined to end, for hygiene's sake. She conducts weekly spot inspections of teeth and nails to try to raise standards. The school development fund has paid for new latrines, with jerrycans of water and bits of soap outside.
Twenty years of tyranny, government-orchestrated genocide and civil wars destroyed an infrastructure that included a decent school system. The inspectorate ceased to function and teacher morale - and wages - hit rock-bottom. Today, following a rigorous national curriculum and led by a multi-party government, schools and other institutions are being revived.
It will not be easy and it won't happen overnight, but the parents of the Bulindi pupils believe it is worth the struggle.