Madara is an Uchiha, he got Senju cells of Hashirama. Years later, he awoke the rinnegan.
Then he stated that only an Uzumaki can wield the powers of the rinnegan comfortably and gave the rinnegan to Nagato.
This means, Uchiha chakra + Senju chakra = Uzumaki chakra.
THE SO6P IS AN UZUMAKI.