Using for loop to move a container

I tried this but my loop froze