Grammatically both sentences are right.
The difference is in emphasis.
But in the first case it seems more important fact for author is "ни с кем"
In the last case more important fact for author...