1. Abridged Problem Statement  
Given a balanced parentheses string s of even length n (n≤10000), find the lexicographically next balanced parentheses string of the same length, where '(' < ')'. If no such string exists, output "No solution".

2. Detailed Editorial  
We want the next balanced-parentheses sequence in lexicographic order. Think of all balanced sequences of length n sorted as strings: we are given one, and must step to its successor, or say none exists.

Key observations:  
- Any balanced parentheses string has exactly n/2 '(' and n/2 ')'.  
- Lexicographically, '(' is smaller than ')', so "increasing" the string means changing some '(' to ')' as far to the right as possible, then rebuilding the suffix to be the smallest valid tail.

Algorithm outline:  
a. Let s be the input string, 0-indexed, length n.  
b. Starting from position i = n−2 and moving left, skip over every occurrence of the substring "()". Each "()" at positions (i, i+1) is the smallest valid pair; you cannot make a larger string by modifying inside it, so you bypass these blocks first.  
c. After skipping complete "()" pairs, move i left until you find a '(' (i.e., skip any terminal run of ')'). If you fall off the left end, there is no solution.  
d. At position i you have a '('. Change it to ')'. This is the "increase" step.  
e. Now consider the prefix s[0..i]. Count how many '(' and ')' it contains: call them open and close.  
f. The remaining positions (i+1..n−1) must be filled to restore balance. You need total n/2 opens and n/2 closes, so the suffix must have  
     remainingOpen = n/2 − open  
     remainingClose = n/2 − close  
   Place all remainingOpen '(' first (smallest lexicographically), then remainingClose ')'.  
This constructs the lexicographically smallest valid suffix after the increase, ensuring the overall result is the immediate next sequence.

Time complexity O(n) and linear memory.

3. C++ Solution

```cpp
#include <bits/stdc++.h>

using namespace std;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& x) {
    return out << x.first << ' ' << x.second;
}

template<typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& x) {
    return in >> x.first >> x.second;
}

template<typename T>
istream& operator>>(istream& in, vector<T>& a) {
    for(auto& x: a) {
        in >> x;
    }
    return in;
};

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& a) {
    for(auto x: a) {
        out << x << ' ';
    }
    return out;
};

string s;

void read() { cin >> s; }

void solve() {
    // Next balanced bracket sequence in lexicographic order, with '(' < ')'.
    // Scan from the right past the trailing "()" pairs; the first position we
    // can increment is an '(' that we flip to ')'. Among the positions before
    // and including it we count how many '(' and ')' remain, then fill the
    // suffix with the lexicographically smallest valid completion: all the
    // remaining '(' first, then all the remaining ')'. If no such '(' exists
    // there is no greater sequence and we report "No solution".

    int n = s.size();

    int i = n - 2;
    while(i >= 0 && s.substr(i, 2) == "()") {
        i -= 2;
    }

    if(i < 0) {
        cout << "No solution\n";
        return;
    }

    while(i >= 0 && s[i] == ')') {
        i--;
    }

    if(i < 0) {
        cout << "No solution\n";
        return;
    }

    s[i] = ')';

    int open = 0, close = 0;
    for(int j = 0; j <= i; j++) {
        if(s[j] == '(') {
            open++;
        } else {
            close++;
        }
    }

    int remaining_open = n / 2 - open;
    int remaining_close = n / 2 - close;

    string result = s.substr(0, i + 1);
    for(int j = 0; j < remaining_open; j++) {
        result += '(';
    }

    for(int j = 0; j < remaining_close; j++) {
        result += ')';
    }

    cout << result << '\n';
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int T = 1;
    // cin >> T;
    for(int test = 1; test <= T; test++) {
        read();
        // cout << "Case #" << test << ": ";
        solve();
    }

    return 0;
}
```

4. Python Solution

```python
def next_sequence(s):
    n = len(s)
    # Step 1: skip trailing "()" pairs from the right
    i = n - 2
    # while we have room and see "()" at positions i,i+1
    while i >= 0 and s[i:i+2] == "()":
        i -= 2
    # no place to increase
    if i < 0:
        return "No solution"
    # Step 2: skip trailing ')' to find a '(' to flip
    while i >= 0 and s[i] == ')':
        i -= 1
    if i < 0:
        return "No solution"
    # Step 3: flip '(' to ')'
    prefix = list(s[:i])  # we'll rebuild prefix
    prefix.append(')')
    # count opens and closes in new prefix
    open_cnt = prefix.count('(')
    close_cnt = prefix.count(')')
    # Step 4: determine how many '(' and ')' remain
    half = n // 2
    rem_open  = half - open_cnt
    rem_close = half - close_cnt
    # Step 5: append the lexicographically smallest suffix
    # all remaining '(' then all remaining ')'
    suffix = ['(']*rem_open + [')']*rem_close
    return "".join(prefix + suffix)

if __name__ == "__main__":
    import sys
    s = sys.stdin.readline().strip()
    print(next_sequence(s))
```

5. Compressed Editorial  
Scan from the end, skip every "()" pair, then skip a run of ')', find and flip the next '(' to ')'. Finally, rebuild the suffix by adding the minimum number of '(' then ')' to restore balance. If no flip is possible, output "No solution".
