SC restores thousands of sacked govt employees