if a then b else if c then d else when e do f