Ali went _____ the factory _____ himself.

Ali went _____ the factory _____ himself.

Explanation

Correct sentence: "Ali went to the factory by himself."

"To" shows direction, "by himself" shows he went alone.