Print anagram of string if its another's substring

O(N*N!) * O(string::find) solution. First half is for finding all
anagrams and second half is for checking substring.