It shows me the longest string but it doesn't work