Is the checkbox not not unchecked? Doing code review, I stumbled upon the following code, that tests the status of a checkbox:

if (!isNotUnchecked()) { ... }


I had to brainstorm for 30 minutes to find out what actual checkbox status the code was expecting. Please write me a program that can simplify these silly expressions!



The program should accept as input a string representing the expression to simplify (for example: !isNotUnchecked()). The program should output a logically equivalent simplified expression, either isChecked() or !isChecked().

The method name in the input expression always starts with is, contains 0..n Not, and ends with Checked() or Unchecked().
The method can be prefixed by any number of !.

Examples

isChecked() =&gt; isChecked()
isUnchecked() =&gt; !isChecked()
isNotChecked() =&gt; !isChecked()
!isNotChecked() =&gt; isChecked()
!!!isNotNotUnchecked() =&gt; isChecked()
Python, 51 bytes



lambda s:sum(map(s.count,'!NU'))%2*'!'+'isC'+s[-8:]


Try it online!