def residue_points(m):
    """Return a dictionary with each residue and the numbers that produce it"""
    D = {}
    for i in range(m):
        
        r = (i**2) % m
        if str(r) in D:
            D[str(r)].append(i)
        else:
            D[str(r)] = [i]
        
    return D