from collections import Counter
from itertools import combinations

def get_changes(n, edges1, edges2):
    change_count = 0
    change_pairs = []
    for edge in edges1:
        if edge not in edges2:
            change_count += 1
            change_pairs.append(tuple(sorted(edge)))
    return change_count, change_pairs

def validate_solution(n, m, k, edges1, edges2, operations):
    if len(operations) > 2**105:
        return False
    change_count, change_pairs = get_changes(n, edges1, edges2)
    if change_count != k:
        return False
    changes_found = Counter(change_pairs)
    operations_found = Counter(tuple(sorted(op)) for op in operations)
    if changes_found != operations_found:
        return False
    return True

def check_graph_operations(n, m, k, edges1, edges2):
    operations = []
    for comb in combinations(range(1, n+1), 3):
        edges_comb = set(frozenset(sorted(comb[i:i+2])) for i in range(3))
        if edges_comb & set(edges1):
            edges1 = list(edges1)
            for edge in edges_comb:
                if (edge in edges1):
                    edges1.remove(edge)
            operations.append(list(comb))
            if validate_solution(n, m, k, edges1, edges2, operations):
                return operations
    return None
