def safe_get_key(dictionary, keys, default):
    """
    Examples
    --------
    >>> d = dict(a=2, b=2, c=dict(d=12, e=45, f=dict(g=32)))
    >>> safe_get_key(d, 'a', 1)
    2
    >>> safe_get_key(d, ['a'], 1)
    2
    >>> safe_get_key(d, ['asdf'], 1)
    1
    >>> safe_get_key(d, ['c', 'f', 'g'], 1)
    32
    >>> safe_get_key(d, ['c', 'f', 'asdfasfd'], 1)
    1
    >>> safe_get_key(d, ['c', 'fasdfasf', 'g'], 1)
    1
    """
    if isinstance(keys, str):
        keys = [keys]

    current_key = keys.pop(0)
    try:
        if len(keys) == 0:
            return dictionary[current_key]
        else:
            return safe_get_key(dictionary[current_key], keys, default)
    except KeyError:
        return default