The issue is simple ,during the push your inserting the ref not the value .So the last value printed many time while printing ,since the array contains the only list of ref .
Like what your doing during in the first print here also you needs to insert the value not ref .