Exactly solvable deformations of the oscillator and Coulomb systems and their generalization