[Question]
  [
# Input
A string that contains at most one of each of the letters `A`, `B`, and `C`. They may be in any order. The empty string is valid input.
**Note:** A previous version of this challenge used the letters `LEJ` instead of `ABC` and they may still be used if desired.
# Output
A string of the `A`, `B`, `C` letters that were not present in the input. They may be in any order.
If the output would be the empty string then simply giving no output is valid, if that makes sense for your implementation. (e.g. you don't need to actually call `print` on an empty string.)
# Examples
* If the input is `B` then the output should either be `CA` or `AC` since `A` and `C` are not present in the input.
* If the input is the empty string then the output should be `ABC` or any permutation since none of the three letters are present in the input.
* If the input is `CAB` then the output should be the empty string because all three letters are present in the input.
# Test Cases
There are so few input cases that we can enumerate all of them:
```
in -> out1 | out2 | out3 | ...
ABC -> ""
ACB -> ""
BCA -> ""
BAC -> ""
CAB -> ""
CBA -> ""
AB -> C
AC -> B
BC -> A
BA -> C
CA -> B
CB -> A
A -> BC | CB
B -> CA | AC
C -> AB | BA
"" -> ABC | ACB | BCA | BAC | CAB | CBA
```
All valid outputs for each input are given, separated by `|`'s. `""` represents the empty string
# Scoring
The shortest code in bytes wins. But keep in mind that you may get more recognition for solving the challenge in a [unique](https://esolangs.org/wiki/Language_list) way rather than in a short way ;)
  
[Answer]
# Python 3, ~~29~~ ~~27~~ 22 bytes
```
lambda x:{*"ABC"}-{*x}
```
-2 bytes thanks to Jonathan Allan
-5 bytes thanks to Rod
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 bytes
Thanks to @DuctrTape for the prod about the change and the presence of "ABC" in Jelly's dictionary.
```
‚Äú·∏É¬ª·∏ü
```
**[Try it online!](https://tio.run/nexus/jelly#@/@oYc7DHc2Hdj/cMf9/uHU0kKtr96hhbqz14fZwFa7D7Y@a1rj//x@t7ujkrK6j7ujsBCSdnB1BpCNIxNkRJOLsBBIBM8GiYMVgMbBSsC6wHhAHiNVjAQ)**
`‚Äú·∏É¬ª` looks up the entry "ABC" in Jelly's dictionary, `·∏ü` is the filer discard dyad which discards the characters found in the input from that list of characters. The result is implicitly printed.
---
For a lower case version the dictionary entry to use can be either of "abac" (`‚Äúc¬ª`) or "abaca" (`‚Äúi¬ª`).
---
When the challenge was "LEJ" only **6** bytes could be achieved in the upper case variant, since no dictionary entries exist with that set of characters, leaving us to create the list of characters `‚ÄúLEJ‚Äù` (or a permutation thereof).
The lowercase variant faired better at **5** bytes due to the presence of the word "jell" (`‚Äú·∫é·πÑ¬ª`).
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + coreutils, 15 bytes
```
tr -d x$1<<<LEJ
```
[Try it online!](https://tio.run/nexus/bash#@19SpKCbolChYmhjY@Pj6vX//38vVwA "Bash ‚Äì TIO Nexus")
I'd like to omit the `x`, but then `tr -d` would be missing an argument when the input string was empty. (The `x` doesn't do any harm, since there aren't any x's in the here-string LEJ.) I'd normally write `tr -d "$1"`, but doing it the way I did is one byte shorter than that.
[Answer]
# [Retina](https://github.com/m-ender/retina), 14 bytes
Byte count assumes ISO 8859-1 encoding.
```
$
¬∂ABC
D`.
A1`
```
[Try it online!](https://tio.run/nexus/retina#FYrBDcAwEML@zJFKeUXqCEClrnFTdoAudiEvbJlrvtUD/0cZTy3wru4jtCATomEKFpGJJYaT8kiHsQE "Retina ‚Äì TIO Nexus")
### Explanation
```
$
¬∂ABC
```
Append a second line containing `ABC`.
```
D`.
```
Deduplicate the characters. This deletes every character from the second line which already appears in the first line.
```
A1`
```
Discard the first line.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~6~~ 4 bytes
Saved 2 bytes using the new `≈æR` command as suggested by *Kevin Cruijssen*
```
≈æRs–º
```
[Try it online!](https://tio.run/##yy9OTMpM/f//6L6g4gt7/v93cgYA "05AB1E ‚Äì Try It Online")
or as a [Test Suite](https://tio.run/##yy9OTMpM/X90X9DhZY@a1hydfHrO4ZVllS72SgqP2iYpKNmDpIov7Pmv8x8A)
**Explanation**
```
   –º  # remove the character of
  s   # the input
≈æR    # from the string "ABC"
```
[Answer]
# Java 7, ~~73~~ 58 bytes
```
String c(String s){return"EJL".replaceAll("[ "+s+"]","");}
```
15 bytes saved thanks to *@KritixiLithos*.
**Test code:**
[Try it here.](https://ideone.com/bHBU8m)
```
class M{
  static String c(String s){return"EJL".replaceAll("[ "+s+"]","");}
  public static void main(final String[] a) {
    System.out.print("LEJ=" + c("LEJ") + "; ");
    System.out.print("LJE=" + c("LJE") + "; ");
    System.out.print("EJL=" + c("EJL") + "; ");
    System.out.print("ELJ=" + c("ELJ") + "; ");
    System.out.print("JLE=" + c("JLE") + "; ");
    System.out.print("JEL=" + c("JEL") + "; ");
    System.out.print("LE=" + c("LE") + "; ");
    System.out.print("LJ=" + c("LJ") + "; ");
    System.out.print("EJ=" + c("EJ") + "; ");
    System.out.print("EL=" + c("EL") + "; ");
    System.out.print("JL=" + c("JL") + "; ");
    System.out.print("JE=" + c("JE") + "; ");
    System.out.print("L=" + c("L") + "; ");
    System.out.print("E=" + c("E") + "; ");
    System.out.print("J=" + c("J") + "; ");
    System.out.print("\"\"=" + c(""));
  }
}
```
**Output:**
```
LEJ=; LJE=; EJL=; ELJ=; JLE=; JEL=; LE=J; LJ=E; EJ=L; EL=J; JL=E; JE=L; L=EJ; E=JL; J=EL; ""=EJL
```
[Answer]
# [Actually](https://github.com/Mego/Seriously), 7 bytes
```
"LEJ"-Œ£
```
[Try it online!](https://tio.run/nexus/actually#@6/k4@qlpHtu8f//Sj5OSgA "Actually ‚Äì TIO Nexus")
```
"LEJ"-Œ£
"LEJ"    the letters
     -   exclude letters present in input
      Œ£  concatenate
```
[Answer]
# Pyth, 5 bytes
```
-"ABC
```
[Test it here](http://pyth.herokuapp.com/?code=-%22ABC&input=%22ab%22&test_suite=1&test_suite_input=%27ABC%27%0A%27ACB%27%0A%27BCA%27%0A%27BAC%27%0A%27CAB%27%0A%27CBA%27%0A%27AB%27%0A%27AC%27%0A%27BC%27%0A%27BA%27%0A%27CA%27%0A%27CB%27%0A%27A%27%0A%27B%27%0A%27C%27%0A%27%27&debug=0)
Expands to
```
-"ABC"Q
-       # Filter on absence
 "ABC"  # Literal string 
      Q # Input
```
[Answer]
# MATL, ~~10~~ 8 bytes
Saved two bytes thanks to Suever. `setdiff` is shorter than `ismember`.
```
'ABC'iX-
```
[**Try it here!**](https://matl.suever.net/?code=%27ABC%27iX-&inputs=%27BA%27&version=19.7.4)
**Explanation**
```
'ABC'      % Create a string literal
     i     % User input
      X-   % Set difference, between two elements of the stack 
```
Yes, this might have been a trivial task, but I'm quite satisfied I managed to solve it with MATL all by myself. I never said it was the shortest solution... Thanks Suever!
[Answer]
# JavaScript ES6, 41 39 38 Bytes
```
s=>eval(`'ABC'.replace(/[${s}]/g,'')`)
```
Saved 2 bytes thanks to Arnauld.
Saved 1 bytes thanks to LarsW.
```
f=s=>eval(`'ABC'.replace(/[${s}]/g,'')`)
console.log(f("AB"));
```
[Answer]
# [V](https://github.com/DJMcMayhem/V), 10 bytes
```
CLEJ<ESC>√ì[<C-r>"]
```
[Try it online!](https://tio.run/nexus/v#@@/s4@olfXhytJBS7P//rj4A "V ‚Äì TIO Nexus")
Hexdump:
```
00000000: 434c 454a 1bd3 5b12 225d                 CLEJ..[."]
```
### Explanation
Input is on the first line of the buffer. So something like:
```
EL
```
and the cursor is on the first character. So we delete the input (which stores it in register `"`) and enter insert mode simultaneously using `C`.
Once in insert mode, the characters `LEJ` are inserted, after which I return to normal mode using `<ESC>`.
Now we have to remove all the characters that are present in the input.
```
√ì                       " remove every
 [<C-r>"]               "  character that appears in the input
                        " synonym of Vim's :s/[<C-r>"]//g
```
And once this happens, we are left with the remaining letters in the buffer.
[Answer]
## Ruby, ~~27 19~~ 18 bytes
```
->s{"ABC".tr s,""}
```
-1 byte thanks to Martin Ender
[Answer]
# [Haskell](https://www.haskell.org/), ~~27~~ 26 bytes
```
import Data.List
("ABC"\\)
```
[Try it online!](https://tio.run/nexus/haskell#@5@ZW5BfVKLgkliSqOeTWVzyPzcxM0/BViEzryS1KDG5REFDydHJWSkmRvO/kyMA "Haskell ‚Äì TIO Nexus") Usage: `("ABC"\\) "CB"` yields `"A"`. 
`\\` is the set difference operator, the parenthesis form a so called *section* which is a short form for the lamda `(\x -> "ABC" \\ x)`.
---
**Without import:** (same byte count thanks to @nimi)
```
f x=[c|c<-"ABC",all(/=c)x]
```
[Try it online!](https://tio.run/nexus/haskell#@5@mUGEbnVyTbKOr5OjkrKSTmJOjoW@brFkR@z83MTNPwVYhM68ktSgxuUQh7b@TIwA "Haskell ‚Äì TIO Nexus") Usage: `f "CB"` yields `"A"`.
---
Other approaches:
```
f x=filter(`notElem`x)"ABC"
(`filter`"ABC").flip notElem
f x=[c|c<-"ABC",notElem c x]
```
[Answer]
# [GNU sed](https://www.gnu.org/software/sed/), ~~34~~ 29 bytes
Includes +1 for `-r`
-5 thanks to [Digital Trauma](https://codegolf.stackexchange.com/users/11259/digital-trauma)
```
s/^/ABC/
:
s/(.)(.*)\1/\2/
t
```
[Try it online!](https://tio.run/nexus/bash#DckxDoAgEATAfl9BB5jIRUu7u/0GodIPiP/HbWfmc6f9TXlNG@ZBw4VppdXSttoP66fhW3lBB2cg6Agn6AGGy8VSoUwEPfgD "Bash ‚Äì TIO Nexus")
For some reason TIO doesn't work with extended regex (`-r`), so I had to wrap it in BASH.
---
```
s/^/ABC/        # put ABC at the beginning of the string
:               # nameless label
s/(.)(.*)\1/\2/ # remove a duplicate letter
t               # branch to the nameless label if something changed
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 120 + 3 = 123 bytes
```
<>((((((((()()){}){}){}){}){}())())())<>{({}(<()>)){(([({})]<>({}))){(<({}<>{})<>([{}]{}<>)>)}{}}{}{}<>{}{({}<>)<>}{}}<>
```
It is run with the `-c` flag, adding 3 bytes
[Try it online!](https://tio.run/nexus/brain-flak#TYvRCcAwCETXOT@6gQidI@SrY4iz25eEQuVA73zXHvrGZJb1F8GRRwrrsoCRBs4mXdYKnAOmADWy5nKglYXOKzcCsEKP7ruv5wU "Brain-Flak ‚Äì TIO Nexus")
## Explanation
Overall this program pretty much does the right stack set minus the left stack with the right stack initialized to `CBA` and the left stack initialized to the input.
### Annotated Code
```
<>((((((((()()){}){}){}){}){}())())())<> # Switch to right stack, push CBA, switch back
{({}(<()>)){(([({})]<>({}))){(<({}<>{})<>([{}]{}<>)>)}{}}{}{}<>{}{({}<>)<>}{}}<>
```
*More explanation to come...*
[Answer]
## Mathematica, 37 bytes
```
Complement@@Characters@{"ABC",#}<>""&
```
[Answer]
## [CJam](https://sourceforge.net/p/cjam), 7 bytes
```
"ABC"l-
```
[Try it online!](https://tio.run/nexus/cjam#K/TTr7bysf6v5OjkrOSj@z82r1b/P5cjl7Mjl5OjMwA "CJam ‚Äì TIO Nexus") (As a linefeed-separated test suite.)
[Answer]
# MATLAB / Octave, 20 bytes
```
@(x)setdiff('ABC',x)
```
[Online Demo](http://ideone.com/6S3TMi)
[Answer]
# Octave, ~~29~~ 27 bytes
Saved two bytes thanks to Suever, by creating the string `'ABC'`, inside the `ismember` call.
```
@(s)x(~ismember(x='ABC',s))
```
We use `~ismember()` as logical indices to the variable `x`. The peculiar thing is, we create `x='ABC'` *inside* `ismember`, not in front of it. The order Octave sees this:
```
@(s)                        % Anonymous function that takes a string s as input
                x='ABC'     % Create a variable x with the characters 'ABC'
       ismember(x='ABC',s)  % True for elements that are in both x and s. False otherwise.
      ~ismember(x='ABC',s)  % Negate this, so that we keep the characters that aren't in s
@(s)x(~ismember(x='ABC',s)) % Use the logical vector as indices to x and return the result
```
[Answer]
# C#, 50 Bytes 32 Bytes 47 Bytes 35 Bytes
where `i` is the input:
```
i=>string.Join("","ABC".Except(i));
```
**Full app tested in LINQPad**
```
void Main()
{
    var testcases = new Dictionary<string,string[]>
    {
        ["ABC"] = new[]{""},
        ["ACB"] = new[]{""},
        ["BCA"]  = new[]{""},
        ["BAC"]  = new[]{""},
        ["CAB"]  = new[]{""},
        ["CBA"]  = new[]{""},
        ["AB"] = new[]{"C"},
        ["AC"] = new[]{"B"},
        ["BC"] = new[]{"A"},
        ["BA"] = new[]{"C"},
        ["CA"] = new[]{"B"},
        ["CB"] = new[]{"A"},
        ["A"] = new[]{"BC","CB"},
        ["B"] = new[]{"CA","AC"},
        ["C"] = new[]{"AB","BA"},
        [""] = new[]{"ABC","ACB","BCA","BAC","CAB","CBA"},
    };
    
    var output = "";
    
    foreach(var input in testcases.Keys)
    {
        var expect = testcases[input];
        var actual = GetResult(input);
        if(!expect.Contains(actual)) throw new ApplicationException($"{input}:{string.Join(",",expect)}:{actual}");
        output+=$"{input} -> {actual}\n";
    }
    output.Dump();
}
// Define other methods and classes here
private string GetResult(string input){
    return string.Join("","ABC".Except(i));
}
```
**Test results**
> 
> ABC ->  
> 
> ACB ->  
> 
> BCA ->  
> 
> BAC ->  
> 
> CAB ->  
> 
> CBA ->  
> 
> AB -> C  
> 
> AC -> B  
> 
> BC -> A  
> 
> BA -> C  
> 
> CA -> B  
> 
> CB -> A  
> 
> A -> BC  
> 
> B -> AC  
> 
> C -> AB  
> 
> -> ABC
> 
> 
> 
[Answer]
# [Carrot](https://github.com/kritixilithos/Carrot), 15 bytes
*I found a bug with returning matches and empty strings. So I just fixed it*
```
ABC^//[^#]/gS""
```
[Try it online!](http://kritixilithos.github.io/Carrot/) (copy & paste)
### Explanation
```
ABC^                   //sets stack (just a string, not an array) to "ABC"
    /                  //return match(es) of:
     /[^#]/g           // `#` is the placeholder for the input
                       // so effectively, this returns the matches of any character not present in the input
                       // applied on the stack
                       //this returns an array of all the matches of the regex
            S""        //join all the elements of the array using "", the empty string
```
[Answer]
# APL, 7 bytes
```
'ABC'‚àò~
```
`~` is set subtraction, `‚àò` is compose, so this is a function that returns `ABC` minus the characters in its input.
[Answer]
## [Jellyfish](https://github.com/iatorm/jellyfish), 9 bytes
```
PNI
 "ABC
```
[Try it online!](https://tio.run/nexus/jellyfish#@x/g58mloOTo5Pz/v6MTAA "Jellyfish ‚Äì TIO Nexus")
In more conventional notation, this program translates to:
```
P(N("ABC", I))
```
`I` is the input, `N` is list difference, and `P` is output.
[Answer]
# Perl 5.9.9 ~~79 38 37~~ 35 bytes
```
perl -le '$_="ABC";eval"y/$ARGV[0]//d";print'
```
(not sure of the counting rules here - have included switches but not the perl command).
```
> perl -le '$_="ABC";eval"y/$ARGV[0]//d";print' AB
C
> perl -le '$_="ABC";eval"y/$ARGV[0]//d";print'
ABC
```
(adjusted counts after adjudication comment below)
[Answer]
## Common Lisp, 71 bytes
The largest entry at the moment, but at least it is readable ;-)
```
(lambda(s)(coerce(set-difference'(#\A #\B #\C)(coerce s'list))'string))
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 13 12 bytes
```
"ABC"r"[{U}]
```
Saved a byte thanks to ETHproductions.
[Try it online!](https://tio.run/nexus/japt#@6/k6OSsVKQUXR1aG/v/v5KjEgA "Japt ‚Äì TIO Nexus")
[Answer]
## Pyth, 4 bytes
```
-<G3
```
[Try it here!](http://pyth.herokuapp.com/?code=-%3CG3&input=%22a%22&debug=0)
```
 <G3 -  alphabet[:3]
-    - input-^
```
Note this uses lower case which might not be acceptable
[Answer]
# C, 53 bytes
```
b=64;c(char*a){while(b<67)putchar(++b*!strchr(a,b));}
```
If implicit declarations of string.h are not allowed, **72 bytes**, to add `#include<string.h>`
[Try it online!](https://tio.run/nexus/c-gcc#U87MS84pTUm1KS4pysxL18uw@59ka2ZinayRnJFYpJWoWV2ekZmTqpFkY2auWVBaAhLV0NZO0lIEakjOKNJI1EnS1LSu/Z@ZV6KQm5iZpwFiVOkogLVrVWoqVHMpKCgkayg5Kmlac9X@BwA)
---
or something a bit more fun at **75 bytes**
```
a[128]={};b=64;c(char*d){while(*d)++a[*d++];while(b<67)putchar(b*!a[++b]);}
```
[Try it online!](https://tio.run/nexus/c-gcc#@58YbWhkEWtbXWudZGtmYp2skZyRWKSVolldnpGZk6oBZGlrJ0ZrpWhrx1pDhJJszMw1C0pLQAo1krQUE6O1tZNiNa1r/2fmlSjkJmbmaYAYVToKYKO0KjUVqrkUFBSSNZQcnZU0rblq/wMA)
[Answer]
## Batch, 101 bytes
```
@set/ps=
@for %%c in (L E J)do @call set d=%%s:%%c=%%&call:c %%c
:c
@if "%d%"=="%s%" set/pd=%1<nul
```
Takes input on STDIN, which means that `%1` is empty when the code falls through into the helper subroutine and nothing gets printed.
[Answer]
# [R](https://www.r-project.org/), ~~47~~ 40 bytes
```
gsub(paste0("[",scan(,""),"]"),"","ABC")
```
[Try it online!](https://tio.run/##K/r/P724NEmjILG4JNVAQylaSac4OTFPQ0dJSVNHKRZEKOkoOTo5K2n@V3d0Vv8PAA "R ‚Äì Try It Online")
Replaces any letters in the input string with the empty string.
]