simple recurrent neural network for finding index of max element