The second and third of these ifs could be changed to elifs to safe yourself a couple of operations per loop. In addition, since all the conditions you check for in your while loop result in a break, you could simplify it to ```while True:```.