Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT adj = [ [ ] for i in range ( 101 ) ] NEW_LINE visited , cnt = [ 0 for i in range ( 101 ) ] , 0 NEW_LINE S = " abaaba " NEW_LINE K = 2 NEW_LINE DEDENT