def buildIdtoLoc(geoDict, idNameDict):
    """
    Build a dictionary mapping from user id to country for all classes
    
    Takes as input a dictionary mapping usernames to countries (as build by
    builddict, above) and a dictionary that maps from ids to names (as is built
    by globalUserList.readId2Name) and returns a dictionary that maps from 
    user id to country
    """
    retDict = {}
    for i in iter(idNameDict):
        if idNameDict[i] in geoDict:
            retDict[i] = geoDict[idNameDict[i]]
        else:
            retDict[i] = 'unknown'
            
    return retDict