Merged rewiring functions
Before updating print function
Updated print function to python3's print function
Refined print function import