They're dried peas, it was an usual way of punishing children with bad behaviour in the school in my country too (back in '80s it was still a thing I guess), they also used (dry) corns.
Teachers did this in my old school back home, it was rice tho. I was a good kid at least so I never got punished, but I heard from others it was hell (more so for the bony kids)
They also used to use gravel and broken glass, depending on the location. When my mother was a child, her parents would have her kneel on gravel to "punish" her. A lot of Mennonites in the area did this to their kids in the 70s.