a program to find the longest anagram possible in a short runtime