Changed print() to printf() for Python 2 compatibility.