Good Substring http://codeforces.com/problemset/problem/271/D