Poverty and welfare dependence across generations