class LogicGate: def __init__(self, n): self.label = n self.output = None def getlabel(self): return self.label def getoutput(s