def f(*args):
l = len(args)
assert l % 2 == 0
return args[:l / 2] == args[l / 2:] or args[:l / 2] == args[l:l / 2 - 1:-1]
assert f(True, True)
assert not f(True, False)
assert f(True, False, True, False)
assert f(True, False, False, True)
assert not f(True, False, True, True)
assert f(1, 1)
assert not f(1, 2)
assert f(1, 2, 1, 2)
assert f(1, 2, 2, 1)
assert not f(1, 2, 0, 1)
assert not f(1, 2, 1, 0)
assert f(1, 2, 3, 1, 2, 3)
assert f(1, 2, 3, 3, 2, 1)
assert not f(1, 2, 3, 1, 2, 0)
assert not f(1, 2, 3, 0, 2, 1)