Smart Keypad -I

Hi,

I am trying to solveSmart Keypad .

The code is working as expected for all of the cases that i tried. But while submitting it is failing a test case.

Thanks.
Pardeep Sharma.