Answer:
Rationalization occurs when the ego replaces a less acceptable motive with a more acceptable one. 
Step-by-step explanation:
Rationalization is a type of defense mechanism, a way the individual uses to cope with the anxiety a situation might cause him/her. 
This specific defense mechanism appears when an unacceptable motive is replaced with an acceptable one. One's perspective changes by providing a different rational explanation to a reality he/she finds unacceptable. 
For example, a student is suspended for bad grades and lack of effort. He/she would rationalize the situation by blaming the teacher instead of him/herself.