rewrite yah3c.py