The point is that the Ukrainian constitution only provides for the extension of powers for the Verkhovna Rada under special circumstances ( martial law). The Constitution does not provide for the extension of powers for the President. So, Z is an illegal president, because the Constitution limits the term of presidency to 5 years only, under any circumstance.