臨機応変

Noun

 * 1) a manner that shows flexibility in response to what the situation demands; to play it by ear, to see which way the wind blows