Multispeed transmission for electric vehicles