Almost finished

It is generating wrong output