Marsden Squares translator in Python