Some solutions implemented in Python for fun