class X def main is shared a = 1 b = 2 assert a & b == 0 assert a | b == 3 assert a ^ b == 3 assert a << b == 4 assert b >> a == 1 assert ~a == -2 assert ~b == -3 a = 1 b = 3 assert a & b == 1 assert a | b == 3 assert a ^ b == 2 assert a << b == 8 assert b >> a == 1 assert ~a == -2 assert ~b == -4 a = 1 a &= 0 assert a == 0 a |= 1 assert a == 1 a ^= 0 assert a == 1 a ^= 1 assert a == 0 a = 1 a <<= 1 assert a == 2 a >>= 1 assert a == 1