an attempt to implement miniKanren in Python