actually, this is pandlindromic problem, see a lot, patten by brute force, goood