Section 21. Whoever, having been convicted, either as principal or accessory, of burglary or robbery, or of any of the crimes described in sections seventeen to twenty, inclusive, of chapter two hundred and sixty-five, or of breaking and entering or of entering a building with intent to commit robbery or larceny, has in his possession or control money, goods, bonds or bank notes, or any paper of value, or any property of another, which was obtained or taken by means of such crime, and, upon being requested by the lawful owner thereof to deliver the same to him, refuses or fails so to do while having power to deliver the same, shall be punished by imprisonment in the state prison for not more than five years or in jail or house of correction for not more than two years.