[Question]
  [
Write a program that is a polyglot in three languages that plays [rock–paper–scissors](https://en.wikipedia.org/wiki/Rock%E2%80%93paper%E2%80%93scissors).
The input for any version of the program is always one of the strings `rock` or `paper` or `scissors`.
In the first language the program must output the rock–paper–scissors choice that beats the input:
```
Input     Output
rock      paper
paper     scissors
scissors  rock
```
In the second language the program must output the rock–paper–scissors choice that ties the input:
```
Input     Output
rock      rock
paper     paper
scissors  scissors
```
In the third language the program must output the rock–paper–scissors choice that loses to the input:
```
Input     Output
rock      scissors
paper     rock
scissors  paper
```
**The shortest code in bytes wins.** Tiebreaker is higher-voted answer.
The inputs and/or outputs may optionally have a trailing newline but otherwise should only be the plain `rock`/`paper`/`scissors` strings. You may use uppercase `ROCK`, `PAPER`, `SCISSORS` if desired.
You may *not* use different versions of the same language (e.g. Python 2 and 3).
  
[Answer]
## Python, brainfuck and JavaScript, ~~103~~ 99 bytes Yay under 100 bytes!
```
0,[.5,];p=["rock","scissors","paper"]
1//1;lambda x:p[p.index(x)-1];"""
x=>p[-~p.indexOf(x)%3]//"""
```
In Python, this defines a function which beats the input, in brainfuck it's just a simple cat program, and in JavaScript it loses. Here's a version which gives the functions a name, `f`, and also prompts for input in JavaScript and Python 3:
```
0,[.5,];p=["rock","scissors","paper"]
1//1;f=lambda x:p[p.index(x)-1];"""
f=x=>p[-~p.indexOf(x)%3]//"""
1//1;"""
console.log(f(prompt())) // JavaScript
1//1"""; print(f(input())) # Python
```
Try it online (older version): [Python](https://tio.run/nexus/python3#@2@gE61nqhNrXWAbrVSUn5ytpKNUnJxZXJxfVAxkFiQWpBYpxXIZ6usbWqfZ5iTmJqUkKlRYFUQX6GXmpaRWaFRo6hrGWispKXGl2VbY2hVE69ZBpfzTgJKqxrH6@iBZLq6Cosy8Eo00DYg1mpoIAYgtyCJwJ2hq/v8PAA),
 [brainfuck](https://tio.run/nexus/brainfuck#@2@gE61nqhNrXWAbrVSUn5ytpKNUnJxZXJxfVAxkFiQWpBYpxXIZ6usbWqfZ5iTmJqUkKlRYFUQX6GXmpaRWaFRo6hrGWispKXGl2VbY2hVE69ZBpfzTgJKqxrH6@kDZ//9BhgMA), [JavaScript](https://tio.run/nexus/javascript-node#@2@gE61nqhNrXWAbrVSUn5ytpKNUnJxZXJxfVAxkFiQWpBYpxXIZ6usbWqfZ5iTmJqUkKlRYFUQX6GXmpaRWaFRo6hrGWispKXGl2VbY2hVE69ZBpfzTgJKqxrH6@iBZruT8vOL8nFS9nPx0jTQNiF2amujCEAsxxeFu0tT8/x8A)
## Explanation:
In Python, `"""..."""` is a multiline string, which can be used as any token. When placed stand-alone it doesn't do anything at all. I use this to "hide" the JavaScript code from Python. The same goes for the `(0,[.5,])` bit, it's just a tuple containing a `0` and a list of `5`, and also the `1//1` part, `//` in Python is integer division, but starts a comment in JavaScript. Here's the code stripped of these tokens:
```
p=["rock","scissors","paper"]
lambda x:p[p.index(x)-1]
```
The first line is pretty self-explanatory, it just defines the list `p` to contain the different choices in rock-paper-scissors. The second line defines an unnamed function which takes one argument, `x`, and gives back the choice that beats `x` (eg. the previous element in `p`)
---
In JavaScript, `//` denotes a single-line comment. Similarly to Python, single tokens are ignored, so the code stripped of these tokens is:
```
p=["rock","scissors","paper"]
x=>p[-~p.indexOf(x)%3]
```
This works similarly to Python, by first setting the list `p` to contain the choices and then defining an anonymous function that gives the losing choice. `-~x` is the same as `x+1` but with higher precedence so that I can skip the parens.
---
In brainfuck, every character except `+-,.[]<>` are removed, leaving this:
```
,[.,][,,]
[.-]
>[-.]
```
The command `,` reads one byte of input, `.` prints it and `[...]` loops while the value is non-zero. What this program does then is read the input and printing it one character at a time until the character `\0` is found. Since we don't have that in the code, we can ignore the rest of the program. In effect, this just echoes back whatever the user types in, effectively tying them.
[Answer]
# Python 2, Ruby, Retina, ~~90~~ 83 bytes
 *-7 bytes thanks to Value Ink*
```
s=['rock','paper','scissors']
print s[s.index((0and gets or input()))+(0and-2or-1)]
```
Try it Online: [Python](https://tio.run/nexus/python2#@19sG61elJ@cra6jXpBYkFoEpIuTM4uL84uK1WO5Cooy80oUiqOL9TLzUlIrNDQMEvNSFNJTS4oV8osUMvMKSks0NDU1tcHiukb5RbqGmrH//0ONAgA),
[Ruby](https://tio.run/nexus/ruby#@19sG61elJ@cra6jXpBYkFoEpIuTM4uL84uK1WO5Cooy80oUiqOL9TLzUlIrNDQMEvNSFNJTS4oV8osUMvMKSks0NDU1tcHiukb5RbqGmrH//4NNAgA), [Retina](https://tio.run/nexus/retina#@19sG61elJ@cra6jXpBYkFoEpIuTM4uL84uK1WO5Cooy80oUiqOL9TLzUlIrNDQMEvNSFNJTS4oV8osUMvMKSks0NDU1tcHiukb5RbqGmrH//4NNAgA)
Wins in Ruby, loses in Python, and ties in Retina.
This solution makes use of the fact that `0` is truthy in Ruby but falsey in Python. It also makes use of negative indexing in both Python and Ruby.
[Answer]
# V, Brain-flak, and Python 2, ~~97, 86, 81, 77~~, 75 bytes
```
o='rock paper scissors'.split()
lambda s:o[o.index(s)-1]#ddt.C rHd*wywVp
```
*Two bytes saved thanks to @nmjcman101!*
This was super fun! I like this answer a lot because it's a cool overview of languages I like: My favorite editor, my favorite non-esoteric language, and a language I wrote. (Technically python 3 is better, but python 2 is golfier so `¯\_(ツ)_/¯`).
[Try it online!](https://tio.run/nexus/python2#@59vq16Un5ytUJBYkFqkUJycWVycX1SsrldckJNZoqHJlWabk5iblJKoUGyVH52vl5mXklqhUaypaxirLJ2SUqLnrFDEJ@2RolVeWR5WwFVQlJlXopGmkZlXUArUran5/z/YeHUA "Python 2 – TIO Nexus") in Python (slightly modified so you can see the output), which prints what loses to the input.
[Try it online!](https://tio.run/nexus/brain-flak#@59vq16Un5ytUJBYkFqkUJycWVycX1SsrldckJNZoqHJlZOYm5SSqFBslR@dr5eZl5JaoVGsqWsYqyydklKi56xQxCftkaJVXlkeVvD/P8ik/7rJAA "Brain-Flak – TIO Nexus") in Brain-Flak, which prints what ties with the input.
[Try it online!](https://tio.run/nexus/v#@59vq16Un5ytUJBYkFqkUJycWVycX1SsrldckJNZoqHJlZOYm5SSqFBslR@dr5eZl5JaoVGsqWsYqyydklKi56xQxCftkaJVXlkeVvD/P8gkAA "V – TIO Nexus") in V, which prints what beats the input.
Since V relies on unprintable ASCII characters, here is a hexdump:
```
00000000: 6f3d 2772 6f63 6b20 7061 7065 7220 7363  o='rock paper sc
00000010: 6973 736f 7273 272e 7370 6c69 7428 290a  issors'.split().
00000020: 6c61 6d62 6461 2073 3a6f 5b6f 2e69 6e64  lambda s:o[o.ind
00000030: 6578 2873 292d 315d 231b 6464 742e 4320  ex(s)-1]#.ddt.C 
00000040: 720e 1b48 642a 7779 7756 70              r..Hd*wywVp
```
Explanation:
## Python
In python, this is very straightforward. We define a list of the three elements, and return the element right before the input. Since `-1` returns the back element, this works circularly, and it's all very straightforward and easy. Then, everything after `#` is a comment.
## Brain-Flak
This is *also* extremely straightforward in brain-flak. If we had to do winning or losing, this would probably be several hundred bytes. But this actually works in 0 bytes. On the start of the program, all of the input is loaded onto the stack. At the end of the program, the whole stack is implicitly printed.
Once we remove all of the irrelevant characters, the code brain-flak sees is
```
()[()]
```
Which simply evaluates to `1 + -1`, but since this value is not used at all, it's a NOOP.
## V
Here is where it gets a little weird. Naming the python list `o` might have seemed arbitrary, but it's definitely not. In V, `o` opens up a newline, and puts us in insert mode. Then, 
```
='rock paper scissors'.split()
lambda s:o[o.index(s)-1]#
```
is inserted into the buffer. After that, the relevant code is:
```
<esc>ddxxf'C r<C-n><esc>Hd*wywVp
```
Explanation:
```
<esc>                          " Return to normal mode
     dd                        " Delete this line. Now the cursor is on '='
       t.                      " Move the cursor forward to the "'"
         C                     " Delete everything after the "'", and enter insert mode
           r                   " From insert mode, enter '<space>r'
            <C-n>              " Autocomplete the current word based on what is currently in the buffer
                               " Since only one word starts with 'r', this will insert 'rock'
                 <esc>         " Leave back to normal mode
                      H        " Go to the first line (where the input is)
                       d*      " Delete everything up until the next occurence of the input
                         w     " Move forward one word
                          yw   " Yank the word under the cursor
                            Vp " And paste that word over the current line, delete everything else
```
[Answer]
# [CJam](https://sourceforge.net/p/cjam), [Retina](https://github.com/m-ender/retina), PHP, ~~92~~ ~~86~~ 85 bytes
```
ECHO["rock",0,"scissors","paper"][ORD(READLINE())%4];
#];"scissors  paper rock"S/rci=
```
Should be run in PHP using the `-r` flag.
[Try it in CJam](https://tio.run/nexus/cjam#@@/q7OEfrVSUn5ytpGOgo1ScnFlcnF9UrKSjVJBYkFqkFBvtH@SiEeTq6OLj6eeqoampahJrzaUcaw1XqqAAVqkANiNYvyg50/b/fxAHAA)
[Try it in Retina](https://tio.run/nexus/retina#@@/q7OEfrVSUn5ytpGOgo1ScnFlcnF9UrKSjVJBYkFqkFBvtH@SiEeTq6OLj6eeqoampahJrzaUcaw1XqqAAVqkANiNYvyg50/b/fxAHAA)
[Try it in PHP](https://tio.run/nexus/php#s7EvyCj47@rs4R@tVJSfnK2kY6CjVJycWVycX1SspKNUkFiQWqQUG@0f5KIR5Oro4uPp56qhqalqEmvNpRxrDVeqoABWqQA2I1i/KDnT9v9/EAcA)
### CJam
In CJam, all capital letters are predefined variables. On the first line, many of these values are pushed onto the stack, along with some string and array literals. Some increments, decrements, and other operations are performed.
After all of that, the stack is wrapped in an array (`]`) and discarded (`;`), so none of that other stuff matters at all. The main CJam program is simply:
```
"scissors  paper rock"S/rci=
"scissors  paper rock"        e# Push this string
                      S/      e# Split it on spaces
                        r     e# Read the input
                         c    e# Cast to char (returns the first character in the string)
                          i   e# Cast to int (its codepoint)
                           =  e# Get the index of the split array (CJam has modular arrays)
```
### Retina
This almost feels like cheating...
Retina will substitute any match of the regex `ECHO["rock",0,"scissors","paper"][ORD(READLINE())%4];` in the input with `#];"scissors paper rock"S/rci=`. Whatever this regex matches, it certainly doesn't match anything in `rock`, `paper`, or `scissors`, so no substitution is made. The unmodified input is then implicitly output.
### PHP
The second line is a comment, so it is ignored.
The first line uses the same algorithm as the CJam part, but with different ordering of the results.
[Answer]
# C, C++, Python; ~~227~~ ~~226~~ 216 bytes
*Saved a byte thanks to @Mat!*
```
#include<stdio.h>/*
f=lambda a:"rock"if a[0]=="r"else"paper"if a[0]=="p"else"scissors"
"""*/
int f(char*b){puts(sizeof'b'-1?*b=='r'?"paper":*b=='s'?"rock":"scissors":*b=='r'?"scissors":*b=='s'?"paper":"rock");}
//"""
```
Defines a function `f` in all languages. Wins in C, ties in Python, loses in C++. Like C++ always does /s
The part between the `/*` and the `*/` is a comment block in C and C++ while it's the lambda function declaration in Python. It basically compares the first character of the function argument and returns the move that starts with that letter.
The part between the `"""`s is a multiline string in Python while it's the function declaration in both C and C++. `sizeof'b'-1` figures out if the current language is C of C++. It has a truthy value if the size is other than 1, a falsy value otherwise. In C character literals are 4-byte long type while in C++ they are a single byte type. Then after the language is figured out it just looks at the first letter of the input and outputs accordingly.
## C
[Try it online!](https://tio.run/nexus/c-gcc#XY3LDoIwFET3fAW5LgqNWtmClQ8hLNrShkZe6YWNxG@vCEaMyzmZmeMPtlPNVOkrjpXtz/WN0cDwRrSyEqFIwfXqDtaEoriUnIMD3aCGQQza/eBhw6gsYu8QAgCgLLDdGJpI1cJRGc/DNGKE9qF7QyQ5JTmVnBNH8s9dumZc8ipN97v02/xDuI@3UZw9A8YWu2@F7SJxlPGqpzKbTSSLpFwa3r@7Lw "C (gcc) – TIO Nexus")
## C++
[Try it online!](https://tio.run/nexus/cpp-gcc#XY3LDoIwFET3fAW5LgqNWtmClQ8hLNrShkZe6YWNxG@vCEaMyzmZmeMPtlPNVOkrjpXtz/WN0cDwRrSyEqFIwfXqDtaEoriUnIMD3aCGQQza/eBhw6gsYu8QAgCgLLDdGJpI1cJRGc/DNGKE9qF7QyQ5JTmVnBNH8s9dumZc8ipN97v02/xDuI@3UZw9A8YWu2@F7SJxlPGqpzKbTSSLpFwa3r@7Lw "C++ (gcc) – TIO Nexus")
## Python
[Try it online!](https://tio.run/nexus/python3#XY1BDsIgFET3PUXzXQBNFN2i2IMYF0AhEmsh/Haj8ewVW2ONy3mZmTeufGfaobEH7BsfNpcjrwonW3XTjSqVgBTMFbwr1Wl7lhIS2BYtRBVt@sFxxmg8YkgIBQBUvPBdXzpqLipVmj3i0CNFf7fBEU3Wu7rSUpJE6s@dmDLmPEnFcie@zT@Ey3gesf2z4Dzbx5iynTrqu@yljLHxXXgB "Python 3 – TIO Nexus")
[Answer]
# C++, R, C; ~~252~~ ~~240~~ ~~226~~ ~~220~~ 209 bytes
```
#define b/*
M=function()cat(readline())
#*/
#import<stdio.h>
#define M()main(){int i=0;char t[9];char*u;char*s[]={"rock","paper","scissors"};scanf("%s",t);for(;*t-*s[i++];);puts(s[(i+=sizeof('a')==1)%3]);}
M()
```
Makes use of the difference between C and C++ that the size of a character literal is 4 bytes in C and 1 byte in C++.
**C++:**
[Try it online!](https://tio.run/nexus/cpp-gcc#NY5BasMwEEX3OoWRCZmx06ahq6KqN8gJjBeqLJEhiWQ0401Dzu4qKV29D5/3@Ws7hUgpNN/7Th1tXJIXygnQO4ES3HSpJSCqtturlq5zLvLJMlF@PX2pf/kIeHVUrRslaci@GX9ypZHhY3ymbvkDD6O96ZL9We/07OZQKtkTcy6s74a9SxH0hvVO0MRcwHTyUjXq@9GgmRdh4AGot0w/IUfYui1ae8DN@4jmruqRdX3s/wI)
**R:**
Result:
```
> #define b/*
> M=function()cat(readline())
> #*/
> #import<stdio.h>
> #define M()main(){int i=0;char t[9];char*u;char*s[]={"rock","paper","scissors"};scanf("%s",t);for(;*t-*s[i++];);puts(s[(i+=sizeof('a')==1)%3]);}
> M()
rock
rock
```
**C:**
[Try it online!](https://tio.run/nexus/c-gcc#NY5BasMwEEX3OoWRCZmx06ahq6KqN8gJjBeqLJEhiWQ0401Dzu4qKV29D5/3@Ws7hUgpNN/7Th1tXJIXygnQO4ES3HSpJSCqtturlq5zLvLJMlF@PX2pf/kIeHVUrRslaci@GX9ypZHhY3ymbvkDD6O96ZL9We/07OZQKtkTcy6s74a9SxH0hvVO0MRcwHTyUjXq@9GgmRdh4AGot0w/IUfYui1ae8DN@4jmruqRdX3s/wI)
[Answer]
## Gawk, Retina, Perl; 68 bytes
```
{eval"\$_=uc<>"}{$_=/[Sk]/?"paper":/[Pc]/?"rock":"scissors"}{print}
```
(with a newline at the end)
### [Gawk](https://tio.run/nexus/awk#@1@dWpaYoxSjEm9bmmxjp1RbDWTpRwdnx@rbKxUkFqQWKVnpRwckg7hF@cnZSlZKxcmZxcX5RcVAtQVFmXkltVz//4OkuMDKuWDSAA) (winner)
Some junk for Perl's sake, then change the line content (`$_`, which is the same as `$0` because the variable `_` is undefined) depending on whether it contains a `k` or a `c`, then print the result. Ignore any warning about escape sequences, I meant to do that.
```
{a_string_that_is_ignored}
{$_ = /[Sk]/ ? "paper" : /[Pc]/ ? "rock" : "scissors"}
{print}
```
### [Retina](https://tio.run/nexus/retina#@1@dWpaYoxSjEm9bmmxjp1RbDWTpRwdnx@rbKxUkFqQWKVnpRwckg7hF@cnZSlZKxcmZxcX5RcVAtQVFmXkltVz//8PEAA) (tie)
Same trick as [Basic Sunset](https://codegolf.stackexchange.com/a/116267) and others: replace matches of some silly regexp on the first line by the content of the second line, so pass the input through.
### [Perl](https://tio.run/nexus/perl5#@1@dWpaYoxSjEm9bmmxjp1RbDWTpRwdnx@rbKxUkFqQWKVnpRwckg7hF@cnZSlZKxcmZxcX5RcVAtQVFmXkltVz//8PEAA) (loser)
Read a line and convert it to uppercase, then choose a word based a letter it contains, and print the result. The first and last step are wrapped using `eval` to hide them from awk.
```
$_ = uc <>;
$_ = /[Sk]/ ? "paper" : /[Pc]/ ? "rock" : "scissors";
print $_
```
## Gawk, Retina, `perl -p`; 57 bytes
I'm entering this as a bonus because the command line switch in `perl -p` is supposed to be part of the program by the usual rules on this site, which would make it not a polyglot.
```
{eval"\$_=uc"}$_=/[Sk]/?"paper":/[Pc]/?"rock":"scissors"
```
Again with a final newline for [Retina](https://tio.run/nexus/retina#@1@dWpaYoxSjEm9bmqxUC6T0o4OzY/XtlQoSC1KLlKz0owOSQdyi/ORsJSul4uTM4uL8omIlrv//YWwA). This time, with [`perl -p`](https://tio.run/nexus/perl5#@1@dWpaYoxSjEm9bmqxUC6T0o4OzY/XtlQoSC1KLlKz0owOSQdyi/ORsJSul4uTM4uL8omIlrv//QUJcYGVcMOH/ugUA) to print the output automatically, the perl overhead is significantly reduced. I can let the assignment to `$_` trigger an implicit print in [awk](https://tio.run/nexus/awk#@1@dWpaYoxSjEm9bmqxUC6T0o4OzY/XtlQoSC1KLlKz0owOSQdyi/ORsJSul4uTM4uL8omIlrv//QUJcYGVcMGEA).
[Answer]
# ><>, Retina, Python 2: ~~144~~ ~~127~~ 123 bytes
*1 byte saved thanks to @Loovjo by removing a space*
*4 bytes saved thanks to @mbomb007 by using `input` instead of `raw_input`*
```
#v"PAPER"v?%4-2{"SCISSORS"v?%2:i
#>ooooo; >oooooooo<"ROCK"~<
a="KRS".index(input()[-1])
print["SCISSORS","ROCK","PAPER"][a]
```
Posted in TNB as a [challenge](http://chat.stackexchange.com/transcript/message/36669654#36669654), I decided to try out this combination of languages.
### ><>
[Try it online!](https://tio.run/nexus/fish#@69cphTgGOAapFRmr2qia1StFOzsGRzsHxQMEjCyyuRStssHAWsFCA0ENkpB/s7eSnU2XIm2St5AlXqZeSmpFRqZeQWlJRqa0bqGsZpcBUWZeSXRCNN0IJp0oLbFRifG/v8PZgMA "><> – TIO Nexus")
The IP starts moving right.
```
#                      Reflect the IP so that it now moves left and it wraps around the grid
i:                     Take one character as input and duplicate it
```
The possible characters that will be taken into the input are `PRS` (since the program only takes the first character). Their ASCII-values are `80`, `81` and `82`.
```
2%                     Take the modulo 2 of the character. Yields 0, 1, 0 for P, R, S respectively
?v                     If this value is non-zero (ie the input was ROCK), go down, otherwise skip this instruction
```
If the input was rock, then this is what would happen:
```
<                      Start moving to the left
~                      Pop the top most value on the stack (which is the original value of R and not the duplicate)
"KCOR"                 Push these characters onto the stack
<                      Move left
oooo                   Output "ROCK" as characters (in turn these characters are popped)
o                      Pop the top value on the stack and output it; but since the stack is empty, the program errors out and exits promptly.
```
Otherwise, if the input was `SCISSORS` or `PAPER`, this is what the IP would encounter:
```
"SROSSICS"             Push these characters onto the stack
{                      Shift the stack, so the the original value of the first char of the input would come to the top
2-4%                   Subtract 2 and take modulo 4 of the ASCII-value (yields 2, 0 for P, S respectively)
?v                     If it is non-zero, go down, otherwise skip this instruction
```
If the input was `PAPER`, then:
```
>ooooooooo             Output all characters on the stack (ie "SCISSORS")
<                      Start moving left
o                      Pop a value on the stack and output it; since the stack is empty, this gives an error and the program exits.
```
Otherwise (if the input was `SCISSORS`):
```
"REPAP"                Push these characters onto the stack
v>ooooo;               Output them and exit the program (without any errors).
```
### Retina
[Try it online!](https://tio.run/nexus/retina#@69cphTgGOAapFRmr2qia1StFOzsGRzsHxQMEjCyyuRStssHAWsFCA0ENkpB/s7eSnU2XIm2St5AlXqZeSmpFRqZeQWlJRqa0bqGsZpcBUWZeSXRCNN0IJp0oLbFRifG/v8PZgMA "Retina – TIO Nexus")
In this case, Retina considers each pair of two lines as a pair of a match and substitution. For example, it tries to replace anything matching the first line with the second line, but since the first line is never matched, it never substitutes it with anything, thus preserving the input.
### Python 2
[Try it online!](https://tio.run/nexus/python2#@69cphTgGOAapFRmr2qia1StFOzsGRzsHxQMEjCyyuRStssHAWsFCA0ENkpB/s7eSnU2XIm2St5AlXqZeSmpFRqZeQWlJRqa0bqGsZpcBUWZeSXRCNN0IJp0oLbFRifG/v8P5QAA "Python 2 – TIO Nexus")
The Python program requires input to be put in between `"`s.
The first two lines are comments in Python.
```
a="KRS".index(input()[-1])             # Get the index of the last character of the input in "KRS"
print["SCISSORS","ROCK","PAPER"][a]    # Print the ath index of that array
```
[Answer]
# Ruby, Clojure, Common Lisp - 251 bytes
```
(print(eval '(if()({(quote SCISSORS)(quote PAPER)(quote PAPER)(quote ROCK)(quote ROCK)(quote SCISSORS)}(read))(eval(quote(nth(position(read)(quote("SCISSORS""PAPER""ROCK")):test(quote string-equal))(quote(ROCK SCISSORS PAPER))))))))
;'['"'+gets+'"']))
```
More readable version with whitespaces:
```
(print(eval '(if() ; distinguish between CLojure and Common Lisp
    ({(quote SCISSORS)(quote PAPER)(quote PAPER)
       (quote ROCK)(quote ROCK)(quote SCISSORS)}(read)) ; use hash-map as a function
    (eval(quote(nth ; find index of the input arg in the list
       (position(read)(quote("SCISSORS""PAPER""ROCK")):test(quote string-equal))  
    (quote(ROCK SCISSORS PAPER))))))))
 ;'['"'+gets+'"'])) ; ruby indexation
```
Clojure always wins, Ruby always draws, Common Lisp always loses.
For Ruby everything inside `'`s is a string. It spans across two lines. Then it uses `[]` operator with a string argument which return the string itself if it's present in the string. The result is printed out, Ruby just mirrors the input.
The second line is a comment for Clojure and Common Lisp. A bunch of `eval` and `quote` has to be used because Clojure needs to make sure that all symbols are valid. It would be nice to reuse code more but even `nth` function have different signatures in these languages. Basically for Clojure `if()` evaluates to true and it goes to the first branch when a hash-map of possible variants is called with argument read from stdin. Common Lisp goes to the second branch, it finds the position of the argument from stdin in the list and returns corresponding item from the resulting list. 
I guess Common Lisp part can be golfed more. 
See it online: [Ruby](http://ideone.com/pKrbKg "Ruby") , [Common Lisp](http://ideone.com/1JaH0z "Common Lisp") , [Clojure](http://ideone.com/d1E3cR "Clojure")
[Answer]
# Scala, Javascript and Ook, 167 bytes
```
s=>{var a="paper,scissors,rock".split(",")/*/**/a[-1]="rock"
return a[a.indexOf(s)-1];`*/a((a.indexOf(s)+1)%3)//`//Ook. Ook. Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook!
}
```
[Try it in Scala](https://ideone.com/PD0zyf) [Try it in Javascript](https://jsfiddle.net/hq2Lecun/1/) [Try the brainfuck version of Ook](https://tio.run/nexus/brainfuck#@68TracT@/9/UX5yNgA)
### Scala - wins
```
s=>{                                                      //define an anonymous function
  var a="paper,scissors,rock".split(",")                  //generate the array
  /* /* */ a[-1]="rock"                                   //scala supports nested comments,
  return a[a.indexOf(s)-1];`                              //so this comment...
  */                                                      //...ends here
  a((a.indexOf(s)+1)%3)                                   //return the winning string
  //`//Ook. Ook. Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook!  //another comment
}
```
### Javascript - loses
```
s=>{                                                   //define an anonymous function
  var a="paper,scissors,rock".split(",")               //generate the array
  /*/**/                                               //a comment
  a[-1]="rock"                                         //put "rock" at index -1
  return a[a.indexOf(s)-1];                            //return the string that loses
  `*/a((a.indexOf(s)+1)%3)//`                          //a string
  //Ook. Ook. Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook!  //a comment
}
```
### Ook! - ties
The Ook part is the simple brainfuck cat program `,[.,]` tranlsated to Ook.
```
s=>{var a="paper,scissors,rock".split(",")/*/**/a[-1]="rock"   //random stuff
return a[a.indexOf(s)-1];`*/a((a.indexOf(s)+1)%3)//`//         //more random stuff
Ook. Ook. Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook!              //the program
}                                                              //random stuff
```
]