neighbors implemented

for a given term this function returns its neighbors, if it is an
existing term it returns a 2-tuple with the given term.