Input (grade 12): It is typically used when Homer injures himself, realizes that he has done something stupid, or when something bad has happened or is about to happen to him.
Output (grade 10): The quote is normally used when Homer hurts himself, finds out that he has done something stupid, or when something bad has happened or is about to happen to him.