jiàn​jī​xíng​shì

to act according to circumstances