The only rule is you can't use fixed size buffers. Storage needs to be dynamic.
Most of the libraries use some sort of pre-defined buffer size and grow that buffer only if capacity is reached. It makes no sense to use fully dynamic buffer as allocating new buffer and copying current buffer contents is a very costly operation to do 38461 times in this challenge!
You can mitigate some of this if you use some sort of mutable dynamic buffer/array/list/etc.
For my final Python submission, I switched from using straight strings to using a list, which is analogous to an array and added to it in place. While the size was extended when needed, copying the existing data wasn't needed.
BTW, your 8th submission only runs 1 out of 4 times on my system; the error is the same as before.
Here's the timeing on my RasPi for a successful run:
riveraa@rpi:~/tmp $ timex ./r3
r LEN: 999986
Front: ZYXWVUTSRQPONMLKJIHGFEDCBA
Back: ZYXWVUTSRQPONMLKJIHGFEDCBA
UBVal: 1000000
1.70user 0.15system 0:01.85elapsed 99%CPU (0avgtext+0avgdata 53088maxresident)k
0inputs+0outputs (0major+12363minor)pagefaults 0swapsAIR.