def pop(self):
    last = self.get_last_stack()
    if (not last):
        return None
    v = last.pop()
    if (last.get_size() == 0):
        del self.stacks[(- 1)]
    return v
def pop(self):
    last = self.get_last_stack()
    if (not last):
        return None
    v = last.pop()
    if (last.get_size() == 0):
        del self.stacks[(- 1)]
    return v