#!/usr/bin/env python3
"""Auto-generated by AGI Loop cycle #1154
Task: ,</think>

Write a Python function that transforms a given list of nested dictionaries into a flat dictionary with keys representing the path from the root to the value, using a separator of "→" betwe
Generated: 2026-02-12T22:12:56.490794
"""

def flatten_nested_dict(nested_dict, separator="→", parent_key=""):
    flat_dict = {}
    for key, value in nested_dict.items():
        new_key = f"{parent_key}{separator}{key}" if parent_key else key
        if isinstance(value, dict):
            flat_dict.update(flatten_nested_dict(value, separator, new_key))
        else:
            flat_dict[new_key] = value
    return flat_dict

if __name__ == '__main__':
    example_data = {
        "a": 1,
        "b": {
            "c": 2,
            "d": {
                "e": 3,
                "f": 4
            }
        },
        "g": 5
    }
    result = flatten_nested_dict(example_data)
    for key, value in result.items():
        print(f"{key}: {value}")