------
## 最终结论
```python
def make_neat_and_clean(t, test_cases):
    results = []
    
    for n, k, s in test_cases:
        operations = []
        
        # Build the target regular sequence with exactly k prefixes
        target_sequence = '(' * k + ')' * k + '(' * (n // 2 - k) + ')' * (n // 2 - k)
        
        s = list(s)
        
        # First, we need to transform the string to match the target sequence
        for i in range(n):
            if s[i] != target_sequence[i]:
                # Find the position to swap with
                for j in range(i + 1, n):
                    if s[j] == target_sequence[i]:
                        # Perform the operation: reverse from i to j
                        operations.append((i + 1, j + 1))
                        s[i:j+1] = reversed(s[i:j+1])
                        break
        
        results.append(operations)
    
    return results

# Input reading and processing
t = int(input())
test_cases = []

for _ in range(t):
    n, k = map(int, input().split())
    s = input().strip()
    test_cases.append((n, k, s))

results = make_neat_and_clean(t, test_cases)

for operations in results:
    print(len(operations))
    for op in operations:
        print(op[0], op[1])
```