There are 2^n possible end states to partition into n outcomes. So there must be at least 1 outcome given by at most 2^n/n end states. If n is not a power of 2, then 2^n is not divisible by n, so there must be one outcome with strictly fewer than 2^n/n states, call it m. However that outcome can only be reached mn input states. Since m < 2^n/n, we have that mn < 2^n. That means there are input states which cannot reach the given outcome. So for any possible strategy the jailer can choose the outcome with fewest possible end states, and then an input state that cannot reach that end state making it impossible for the second prisoner to reach that outcome.
There are 2^n possible end states to partition into n outcomes. So there must be at least 1 outcome given by at most 2^n/n end states. If n is not a power of 2, then 2^n is not divisible by n, so there must be one outcome with strictly fewer than 2^n/n states, call it m. However that outcome can only be reached mn input states. Since m < 2^n/n, we have that mn < 2^n. That means there are input states which cannot reach the given outcome. So for any possible strategy the jailer can choose the outcome with fewest possible end states, and then an input state that cannot reach that end state making it impossible for the second prisoner to reach that outcome.