It completely messed them up and they understood that they were no longer in the dominant position but rather caught in a stalemate. They knew that instead of fighting these two world powers which would ensure mutual destruction, they instead had to contain their ideology. So they never fought the Chinese or the Soviets, excluding the odd relations with China during the Korean war, and they focused on other countries where communism was spreading.