And by that, I mean your quote is one of the big tenets of Leninism.
I recall the quote was from Captain John Smith at Jamestown.
When I Binged, I learned it is Biblical.....Thessalonians.
I think your Lenin reference is “to each according to his needs, from each according to his ability”