#include <bits/stdc++.h> using namespace std; struct Node { char val; set<Node *> next; int notEqual; Node(int v) : val(v), notEqual(0) {} }; int main() { int n = 0; int cur = 0, next = 0; string val; cin >> n; cin >>...