人間万事塞翁が馬(にんげんばんじさいおうがうま)

Japanese vocabulary

Meaning: inscrutable are the ways of heaven; fortune is unpredictable and changeable

See it used in real works