Skip to content
UPEEC

Even Parity Check

Easy#engineering#digital#communication· solved by 0 · time limit 2.0 s

Each 8-bit frame was sent with even parity: the number of 1s, including the parity bit, must be even. For every received frame print OK or ERROR.

Input

nn, then nn frames, each a string of 8 bits.

Output

One result per frame.

Constraints

1≤n≤1051 \le n \le 10^5

Sample 1

Input

3
10110100
11111111
00000001

Output

OK
OK
ERROR

Sign in or join free to run and submit your solution.