Added sorting generals file.
Created swap function in it.