India gained independence from British rule in 1947, but it took the country three years longer to become a republic.