The output is correct but fail condition 2 and 3.