The simple program hangs and doesn't output any result 