Process for reacting over two catalyst beds