Visit to China was to show solidarity with Chinese: President