Python possible solution.