modify PrintSequence method with generic class.