Emoticon facial expression recognition Write a program that accepts as input an emoticon and ouputs if the emoticon is happy or sad.

The program accepts a string as input or parameter, and should display the string "happy" if the input is in the happy emoticon list, or "sad" if the input is in the sad emoticon list.

You can assume the input is always a valid (happy or sad) emoticon, with no space or tabs around.

Here is a space separated list of happy emoticons:

:-) :) :D :o) :] :3 :c) :&gt; =] 8) =) :} :^) :-D 8-D 8D x-D xD X-D XD =-D =D =-3 =3 B^D (-: (: (o: [: &lt;: [= (8 (= {: (^:


Here is a space separated list of sad emoticons:

&gt;:[ :-( :( :-c :c :-&lt; :&lt; :-[ :[ :{ 8( 8-( ]:&lt; )-: ): &gt;-: &gt;: ]-: ]: }: )8 )-8


This is code-golf, so the shortest program wins.
Python, 86 bytes

I should be sent to prison.

x=lambda c: ["happy","sad"][c[0]+c[-1:]in open(__file__).read(88)[::-1]]#&lt;][&gt;&lt;:&gt;{:}(:)


The shortest I could come up with was equivalent to Martin's CJam answer, so I decided I'd hide all the sad emojis (minus the middle character if any) in the reverse of my code and use Python's __file__ quine cheat.

Muahahaha.