def fb_lookup(dic, keys, default):
    """Do dict-lookup for multiple key, returning the first hit.
    """
    for key in keys:
        if key in dic:
            return dic[key]
    else:
        return default