Why is the code showing wrong answer

Check ur lexi function assign the values to string