def correlation_function( spins, r ) :
  # Your code goes here
  
  return 

spins1 = [1,-1,1,1,-1,1,1,1,-1,-1]
print( correlation_function( spins1, 1 ), correlation_function( spins1, 2 ), correlation_function( spins1, 3 ) )
spins2 = [-1,1,1,1,-1,-1,1,1,1,-1]
print( correlation_function( spins2, 2 ), correlation_function( spins2, 2 ), correlation_function( spins2, 3 ) )
