This was said by Jesus:
Matthew 10:29-31
Jesus said, “Truly, I say to you, there is no one who has left house or brothers or sisters or mother or father or children or lands, for my sake and for the gospel, who will not receive a hundredfold now in this time, houses and brothers and sisters and mothers and children and lands, with persecutions, and in the age to come eternal life. But many who are first will be last, and the last first.”
The last sentence is a warning against pride — those who seek to have positions of prominence in this life, may end up as nothing in the Kingdom of God, but those who are humble may end up with great reward. Almost identical statements are given in Matthew 20:16; Mark 10:31; Luke 13:30.
Jesus also said something similar in Luke 14:11
For everyone who exalts himself will be humbled, and he who humbles himself will be exalted.”
He is picking up on a common Old Testament theme of God raising up the humble and bringing down the proud. See, for example, Psalm 18:27; Proverbs 18:12; 29:23; Isaiah 2:11,17; 57:15.
“may end up as nothing”, and “may end up with great reward”
I note in your response to this question you use the word ‘may’ twice. Is this because there is doubt as to what each class will receive?
I used “may” rather than “will” to allow for repentance and forgiveness, and because humility is not the only requirement for God’s kingdom.
thanks for the clarification