Next time try surrounding your code in Code here tags.

You told your program to print twice, and for some reason that was causing an infinite loop. Here is the code a I changed for you

...