Three-year-old Afshan's trip to school is a high-wire balancing act as she teeters across a metal girder spanning a trench of putrid floodwater, eyes fixed ahead.
After record monsoon rain flooded her classroom in the southeastern town of Chandan Mori, this is the route Afshan and her siblings now traverse to a tent where her lessons take place.
"It's a risky business to send children to school crossing that bridge," Afshan's father, Abdul Qadir, 23, told AFP.
"But we are compelled… to secure their future, and our own."
In Pakistan, where a third of the country lives in hardship on less than $4 a day, education is a rare ticket out of grinding poverty.
But this summer, floods destroyed or damaged 27,000 schools and spurred a humanitarian disaster which saw 7,000 more commandeered as aid centres, according to the United Nations Children's Fund.
The education of 3.5 million children has been disrupted as a result, the charity said.
Students are braving lessons in crumbling classrooms and tents after record floods battered the country. AFP
"Everything has gone away, we lost our studies," said 10-year-old Kamran Babbar, who lives in a nearby tent city since his home and school were submerged.
Before the rains, which have been linked to climate change, Afshan followed her sisters to a lime green schoolhouse.
Some two-and-a-half months after they finally abated, her school remains swamped by standing water.
More than 300 boys and girls have decamped to three tents where they sit on floors lined with plastic sheeting, answering teachers' questions in chorus.
As midday approaches the tents are baked by the sun, and students fan themselves with notebooks — quenching their thirst with mouthfuls of cloudy, polluted floodwater.
Many cannot summon the strength to stand when called to answer questions by teacher Noor Ahmed.
"When they fall sick, and the majority of them do, it drastically affects attendance," he said.
In this conservative corner of Pakistan, many girls are already held back from school, groomed for lives of domestic labour.
Those students that were enrolled had their prospects dampened by hunger and malnutrition even before the monsoon washed away vast tracts of crops.
And over the past two years, the Covid-19 pandemic saw schools shut for 16 months.
The floods — which put a third of Pakistan underwater and displaced eight million — are yet one more hurdle many will not overcome.
"We are nurturing an ailing generation," Ahmed said.
In the nearby town of Mounder, the monsoon storms tore the roof off the government school.
The walls are cracked and crumbling, and students now congregate outside, fearful of a collapse.
The boys learn under the shade of a tree in the courtyard, while the girls gather nearby in a donated tent.
"Such events will leave an everlasting traumatic impact on the girls," teacher Rabia Iqbal said.
"If we want to make them mentally healthy, we will have to immediately move them from tents to proper classrooms," she added.
But the return to school is unlikely to be swift.
Analysis suggests the bill for the reconstruction of schools and recovery of the education system will be nearly $1 billion — the total repair bill is close to $40 billion — in a nation already mired in economic turmoil.
Undaunted by the difficulties ahead, the girls of Chandan Mori's high school trudge every day to a temporary classroom three kilometres (two miles) away.
"We will not be defeated by such circumstances," 13-year-old Shaista Panwar said.