Man dies in three-alarm tenement fire