Test case 1 shows Runtime Error

I don’t know why am i getting runtime error . I guess I Implemented the code the correct. Is there any error with string input and string implementation?

please share your code by saving it on the online ide