f=lambda l:l and l==zip(*zip(*l))
tests = [
[],
[(1,), (1,), (2,)],
[(1,)],
[(1, 2, 3, 4)],
[(1, 2, 3, 4, 5), (2,), (12, 314123)],
[(1, 2, 3, 4), (1,)]
]
for test in tests:
print(f(test))
Zj1sYW1iZGEgbDpsIGFuZCBsPT16aXAoKnppcCgqbCkpCgp0ZXN0cyA9IFsKCVtdLAoJWygxLCksICgxLCksICgyLCldLAoJWygxLCldLAoJWygxLCAyLCAzLCA0KV0sCglbKDEsIDIsIDMsIDQsIDUpLCAoMiwpLCAoMTIsIDMxNDEyMyldLAoJWygxLCAyLCAzLCA0KSwgKDEsKV0KXQoKZm9yIHRlc3QgaW4gdGVzdHM6CglwcmludChmKHRlc3QpKQ==