Now, program passes the test004.