Python 3 Submission with threading.Condition, beats 100% & 100%
\nimport threading\n\n\nclass Foo:\n    def __init__(self):\n        self.condition = threading.Condition()\n        self.first_was_printed = False\n        sel
```\nimport threading\n\n\nclass Foo:\n    def __init__(self):\n        self.condition = threading.Condition()\n        self.first_was_printed = False\n        self.second_was_printed = False\n\n    def first(self, printFirst: \'Callable[[], None]\') -> None:\n        with self.condition:\n            printFirst()            \n            self.first_was_printed = True\n            self.condition.notifyAll()\n\n    def second(self, printSecond: \'Callable[[], None]\') -> None:\n        with self.condition:\n            self.condition.wait_for(\n                lambda: self.first_was_printed\n            )\n            printSecond()\n            self.second_was_printed = True\n            self.condition.notifyAll()\n\n    def third(self, printThird: \'Callable[[], None]\') -> None:\n        with self.condition:\n            self.condition.wait_for(\n                lambda: self.second_was_printed\n            )\n            printThird()\n            self.condition.notifyAll()\n```
[]