modify PrintSequence method with generic class.
fix conflict