def group_keyvalue(l):
    result = {}
    for key, value in l:
        result.setdefault(key, []).append(value)
    return result