N-Directional Associative Memory