What caused Russia to exit World War I in 1917?

Athe death of the czar
Ba revolution within Russia
Ca surprise invasion by Poland
Dthe bankruptcy of the Russian treasury