```python
def extract_min_max(test_tup, K):
    """
    Write a function to extract maximum and minimum k elements in the given tuple.
    """
    # Sort the tuple
    sorted_tup = sorted(test_tup)
    
    # Extract K smallest and K largest elements
    min_k = sorted_tup[:K]
    max_k = sorted_tup[-K:]
    
    # Combine and return as a tuple
    result = tuple(min_k + max_k)
    
    return result

```