Final version. Added assert evaluation, added i += 1, added printing final success message, and commented out debug prints.