Shell model and deformed states in O18