Networks of Classical Conditioning Gates and Their Learning