The spinal nerves are connected to the spinal cord and consist of: