[Question]
  [
## Task:
Your challenge is, given previous submissions and itself as input, output the language that they're written in, in the following format:
Say the first program is in Ruby. It must output `1`, because Ruby is the `1`st language used in this challenge. An example program is:
```
a=gets
puts 1
```
When given itself as input, it returns `1`.
The next program might be in Python. It must output `2`, because Python is the `2`nd language used in the challenge. An example program is:
```
print(1 if input()[0]=="a"else 2)
```
Given the first submission, it outputs `1`, and given itself it outputs `2`.
You're allowed to repeat languages, though you're not allowed to submit an answer in the previous answer's language.
For example, if the third program is in Ruby, it must output `1` given the first program and itself (because Ruby is the `1`st language used), and given the second program it must output `2`.
---
## Rules:
* If there are `n` answers currently in the challenge, there must be at least `floor(n / 3)` different languages. Any submission that breaks this rule is disqualified.
* No two "neighbouring answers" (e.g. answer `n` and answer `n+1`) cannot use the same language.
* Different versions of a language do not count as different languages (so `Python 2 == Python 3`).
* Answers must take previous submissions in full as input.
* The first submission must take input.
* You are not allowed to submit multiple answers in a row.
* "Repeat answers" (answers that have the exact same code as a previous submission) are not allowed.
* Answers are not allowed to go over the allocated byte-count of that answer - see "Allocated Byte-count" for more details.
---
## Allocated Byte-count:
For each answer number `n`, the allocated byte-count for that answer is `45 + 5n`.
---
## Answer formatting:
Format your answer like so:
```
# {answer no.}, {language}
{program}
This prints:
- `1` in answer(s) {all answers using 1st language, with links}
- `2` in answer(s) {all answers using 2nd language, with links}
...
{optional explanation}
```
For the answer lists, do this:
```
- `1` in answers [1]({link to answer}), [3]({link to answer})...
```
---
## Scoring:
The first answer to survive after 7 days without any valid submissions after that is declared the winner.
  
[Answer]
## 1. [Retina](https://github.com/m-ender/retina), 0 bytes
[Try it online!](https://tio.run/nexus/retina "Retina – TIO Nexus")
The empty program prints `1` when given empty input (i.e. itself), because it counts how often the empty regex matches the input (which is always `1+length(input)`).
[Answer]
# 2. [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 22 bytes
```
{<>(())(<>)}{}(<>{}())
```
[Try it online!](https://tio.run/nexus/brain-flak#@19tY6ehoampYWOnWVtdC6SAhKbm//84xHUTAQ "Brain-Flak – TIO Nexus")
This checks the top of the stack and puts a one on the opposite stack if it is non-zero. It then increments and returns the opposite stack. This makes it return 1 for the empty program and 2 for anything else.
Since stacks in Brain-Flak default to zero, an empty program will have a zero on the top of the stack while any other program (except programs which end in null characters) will have a truthy value. This means we can run a very simple if program on the input stack.
```
{      (<>)}{}              #If not zero
 <>(())                     #Push one to the other stack
              (<>{}())      #Switch to other stack and increment by one
```
[Answer]
# 3. APL, 7 bytes
```
' {'⍳⊃⍞
```
Explanation:
```
      ⍞  read from the keyboard
     ⊃   first item of list, or space if empty
' {'⍳    index into the string ' {', giving N+1 (=3) if not found
```
[Answer]
# 10. Bash (+coreutils) [language 6], ~~44~~, 74 bytes
**Fixed Version** (returns the language id)
```
expr substr "1234151516" $(expr index "365f8dc0eb" `md5sum|cut -c12`) 1 #G
```
Note: this expects the trailing newline, after the input program text
[Answer]
## 9. [Retina](https://github.com/m-ender/retina) (language 1), 20 bytes
```
$|}\{|[:'][^]']|,\b1
```
[Try it online!](https://tio.run/nexus/retina#hZBNasMwEEb3OkUrUjQDKtT52bgZG7rpIWwFx6raGEwWkUsWkjftLuAr9BLtiXQRV4IuA93MPL5h3sDcwXMzL/xYO1/lQlU7JZSXdZvNM3PbAgARtgWObowtFkQmbpwI03e4fIbpi1kqbGmrB0XUuKZc5n9sm3Kdr/KM7RYeytsqXD7C9KMwwX0iXz@RdyPT@wHsuRv0Aex7a4cTnMz@pe@OBlBmMkPJHael5ILTSnLLaS255rSJI/zP7ut2wzSdD13Ua@A8yZIqiZIGia5fxcfu1fTWQG@Ob0NcRqljzK796hc "Retina – TIO Nexus")
Like plannapus, I decided to go for a rewrite to switch things up a bit, which also ended up shortening the code considerably (a modification of my last answer to account for plannapus's latest would have ended up around 32 bytes, I think).
### Explanation
Like my other answers, this just counts the number of various regex matches, but goes about it much more efficiently:
* `$` matches the end of the string. This always works, even if there's a match going all the way to the end of the string, so this gives us a baseline of `1` for all inputs.
* `}\{` finds a single match in the second program (Brain-Flak), bringing the count there up to `2`. The backslash isn't necessary for escaping but it prevents this part of the regex from matching itself.
* `[:'][^]']` is pretty fancy actually. The only purpose is to count the two `'` in the APL program (language 3) and the three `:` in the JavaScript program (language 4), but we need to prevent this part from matching itself. So we also ensure that the next character is neither `'`, nor `]` (because those don't appear after the ones we *do* want to match, but they do appear in this program here).
* The `'` from the previous part already causes one match in the R programs, so we need three more. The substring `,1` appears in both of them three times, and in no other programs. We match it by adding a tautological wordboundary in between with `,\b1` to prevent it from matching itself again.
[Answer]
# 18. C (language 10), 121 bytes
This is the C89 or C90 standard. It works with either clang or gcc on Try It Online.
```
main(n){char*v=" ^{ s ePfwm",b[999],*c;gets(b);c=strchr(v,*b);n=strlen(b);printf("%d",n?c?c-v:n>99?4:n>60?5:n>15?1:3:1);}
```
This prints:
* `1` with answers [1](https://codegolf.stackexchange.com/a/107333/), [5](https://codegolf.stackexchange.com/a/107341), [7](https://codegolf.stackexchange.com/a/107350), [9](https://codegolf.stackexchange.com/a/107370), and [14](https://codegolf.stackexchange.com/a/107479) (Retina).
* `2` with answer [2](https://codegolf.stackexchange.com/a/107334) (Brain-Flak).
* `3` with answer [3](https://codegolf.stackexchange.com/a/107336) (APL).
* `4` with answers [4](https://codegolf.stackexchange.com/a/107338), [12](https://codegolf.stackexchange.com/a/107422), and [15](https://codegolf.stackexchange.com/a/107495) (Javascript).
* `5` with answers [6](https://codegolf.stackexchange.com/a/107346) and [8](https://codegolf.stackexchange.com/a/107364) (R).
* `6` with answers [10](https://codegolf.stackexchange.com/a/107388) and [17](https://codegolf.stackexchange.com/a/107542) (Bash).
* `7` with answer [11](https://codegolf.stackexchange.com/a/107403) (Mathematica).
* `8` with answer [13](https://codegolf.stackexchange.com/a/107443) (Python).
* `9` with answer [16](https://codegolf.stackexchange.com/a/107511) (Perl).
* `10` with this answer (C).
Here is a bash driver that runs it with all 18 answers on [Try it online!](https://tio.run/nexus/bash#xVTdjqM2FL7nKVxPNtipw0LCX8gA2Z3t7F5UnUiVtlUJSYhxEiQCESYzqSA327uV5hX6Eu0T5UWmJqFqt6rUywrJ5/M5cHyOv@9AoxJ4II2yDVcouL0F3zzcv@yiJEMZrug2KnqPLgTzCnDApuunHSSrYDQahaRHxxtWcrTCY@rysqDbAj2SnthmzTZlWRPaF0lWrhF8FUOS@dSn/Ucn80YjXxfGVH1DGM3wNWfoaHh8ehGnSxtKQT8HafxnWdI6L0AGkgxUqqYomn0agzgHjG5z0M9AJwMQwDFQXqfx@OJtwhl7kapbDyGM0a2HT9VJGLFgLMmgks/Pv50//3J@/lXirsd9Hqih6y6rpT9wWsyXokhRljTv1Mj/Kjh//nR@/j3EDeg3qJ69devqJNGoRPwpKekW8cNK9I4KFsVpkjGEiUY0TGAF3QGBMnSHBHLo6gRS6BoihP8rez1bGRJ1n7aJSE8RhE2yJlWTqEmDXfffT8XjZM1SzpCgYlOKjzGhwi116tOsqgNHDoN5KIc1ma00iR33BbjmAVAbDHXNEI8JQQddQkkWsyOAQ9NY2zFV2QqC5S42@GFX00MJ@lQbLDHQwM17aZrzpEzyLLgT6oloyQo@gfNK5pRNIbnpTiY3YRCICsPwtbKYLBZ9T@uKFj2hjsvNy0z2TafFHbmuWziXhU5aTOVulyrXzjxbFUy1gansW3@9JPTV4koWzLaYy1dmx9K6yHdgG/FtmqxAstvnRdm7ahb97RYs3YYBjAymrUdDk8aWvYLK5UYQ30YDw0RJtj@UCCsso3ksCMDKlh3jZMO48AZDPcQhvvlOkgMgdBdeCcgnzoUBKmw9pxceam0W1x2pdD1UDXRnQGzTGRLD0Yk1dAxi2mKxdMciumMSayT8mmMT03L0Ew4CRVHKUClYfKAMoULQnWDXK3rJnCrNKN@J2t6USMVExV31aNyHda1JQlopa0akujTequAf/Wv6CJJry1C9d6cPu@/Ndzpb/PjDxw@QNLOvW1@3Quss8CtLxUKFYqK/UJY50jVbt8xLWn040L6U12Babt4@pMXj@t3HO/unD9@CZb5nGecpEFoD/VWSRcXP9SrizNRb3bWyO0r/2z/rDw "Bash – TIO Nexus")
Ungolfed equivalent (646 bytes):
```
#include <string.h>
#include <stdio.h>
int main(){
    char *v=" ^{ s ePfwm", b[999];
    gets(b); /* buffer overrun if more than 998 characters in the input.
                could be a problem if we get to 191 answers */
    char *c = strchr(v, b[0]); /* Find first character of input in v, or null */
    int n = strlen(b);
    if (!n) {
        printf("1");
    } else if (c) {
        printf("%d", c-v); /* Index of first character of input in v */
    } else if (n > 99) {
        printf("4");
    } else if (n > 60) {
        printf("5");
    } else if (n > 15) {
        printf("1");
    } else {
        printf("3");
    }
    return 0;
}
```
[Answer]
## 5. [Retina](https://github.com/m-ender/retina) (language 1), 23 bytes
```
^$|(?![⊂⍴])[⊂-⍴]|\B=|{}
```
[Try it online!](https://tio.run/nexus/retina#U9VwT/gfp1KjYa8Y/air6VHvllhNEEMXxKqJcbKtqa79/5@r2sZOQ0NTU8PGTrO2uhZIAQlNTS51hWr1R72bH3U1P@qdx1Vsa1dsXxxtEGtrm1CdYG9kBWUXJ9ibWBlbGXIRsAcA "Retina – TIO Nexus") (Tests all possible inputs.)
Counts the matches of various things in the input:
* `^$` matches the input string, i.e. the first answer once.
* `{}` matches itself, which there are two of in the second program, and one in this one.
* `(?![⊂⍴])[⊂-⍴]` matches characters with code points 8834 to 9076, *exclusive*, which finds three matches in the third program. We use the negative lookahead to avoid the ends of the range being matched in this program.
* `\B=` matches a `=` that *isn't* preceded by a word character. This matches four of the `=` in the fourth program, and doesn't match the `=` in this program.
[Answer]
## 7. [Retina](https://github.com/m-ender/retina) (language 1), 27 bytes
```
^$|(?![⊂⍴])[⊂-⍴]|\B=|{}|\b5
```
[Try it online!](https://tio.run/nexus/retina#U9VwT/gfp1KjYa8Y/air6VHvllhNEEMXxKqJcbKtqa6tiUky/f@fq9rGTkNDU1PDxk6ztroWSAEJTU0udYVq9Ue9mx91NT/qncdVbGtXbF8cbRBra5tQnWBvZAVlFyfYm1gZWxlyEbCLKzmxRKO4PLMkOUOjuDSpuKRIoyg1MSUnMy9VQ1PHUMdQU0epWsnWSEdJXcnWWEepWMnWREcpWcnWFCilyUWETwA "Retina – TIO Nexus") (Tests all possible inputs.)
A minor modification of the [fifth answer](https://codegolf.stackexchange.com/a/107341/8478). `\B=` already finds 4 matches in the sixth answer, and `\b5` finds another without matching any other answers.
[Answer]
# 26. [><>](https://esolangs.org/wiki/Fish) (language 12), 164 bytes
My first ever program in ><>! It's 156 characters, but 164 bytes in UTF-8.
```
^$|(?![⊂⍴])[⊂-⍴]|\B=|{}
{:}&1+&=?v
      .&0/
v+!?='>'i41i
v+?='y'i47
v+?=' 'i12
v+?=' 'i24
v4
v6
v7
v8
v9
va
  v?(0:i
v1
n;\b1laa*)?+
/"^mwfPes{'tc"i2&01.;
```
This prints:
* `1` with answers [1](https://codegolf.stackexchange.com/a/107333/18314), [5](https://codegolf.stackexchange.com/a/107341/18314), [7](https://codegolf.stackexchange.com/a/107350/18314), [9](https://codegolf.stackexchange.com/a/107370/18314), and [14](https://codegolf.stackexchange.com/a/107479/18314) (Retina).
* `2` with answer [2](https://codegolf.stackexchange.com/a/107334/18314) (Brain-Flak).
* `3` with answer [3](https://codegolf.stackexchange.com/a/107336/18314) (APL).
* `4` with answers [4](https://codegolf.stackexchange.com/a/107338/18314), [12](https://codegolf.stackexchange.com/a/107422/18314), and [15](https://codegolf.stackexchange.com/a/107495/18314) (Javascript).
* `5` with answers [6](https://codegolf.stackexchange.com/a/107346/18314) and [8](https://codegolf.stackexchange.com/a/107364/18314) (R).
* `6` with answers [10](https://codegolf.stackexchange.com/a/107388/18314), [17](https://codegolf.stackexchange.com/a/107542/18314), [20](https://codegolf.stackexchange.com/a/107579/18314), [22](https://codegolf.stackexchange.com/a/107818/18314), and [25](https://codegolf.stackexchange.com/a/108122/18314) (Bash).
* `7` with answers [11](https://codegolf.stackexchange.com/a/107403/18314) and [19](https://codegolf.stackexchange.com/a/107575/18314) (Mathematica).
* `8` with answer [13](https://codegolf.stackexchange.com/a/107443/18314) (Python).
* `9` with answer [16](https://codegolf.stackexchange.com/a/107511/18314) (Perl).
* `10` with answers [18](https://codegolf.stackexchange.com/a/107567/18314), [21](https://codegolf.stackexchange.com/a/107817/18314), and [23](https://codegolf.stackexchange.com/a/107936/18314) (C/C++).
* `11` with answer [24](https://codegolf.stackexchange.com/a/107959/18314) (Zsh).
* `12` with this answer (><>).
[Try it online!](https://tio.run/nexus/zsh#tVXrctpGFP6vp9isMSuBwFp0A4EQtlMnjd2EXJpLhbDFShhNQVKQwPZI/Gn/ZSav0Jdon8gvkh4BduPGM850psDsuax09pzvfMthboq6aOrVx8kEdTrkhxdH5MuwlPPWI/v602/Xn/9yhEKpFVo@ODDzbMVlxqpMq2XTWnJo/amXpT1uWX1kmaRLAoUGYIB@Bbq@UREJaONWbSjcEn4at4TtJrdscUsXQi0tXjLgXcqF7cGITl23IlhVbg8PZxfjvp9kJGU4aJQlWm9/gUw5tsneDc@Tm@Q5Lut0eV4Q@E5XWGUrELAIAkdQRq4//3n96ffrz39widlNrMSWHNM8y86shrHVkzNLMWSDcg9hAEfzyUWQsgmfLEZJOufnvutNg9DnBZGKVBBxhs2GiAk2ZREn2FREzLCpwpbwUPR8MFI5Zl5MAgjPeIyLYEWoIlARRjDN@08V2sHYnyY@P/XD8xReFkQGbq6UrwZZbhvEsYcOcXIR8OX8y3iONnEQpg1ZoSp8NYxK/HorCD3/EmFZU8dNj0n@CKOzmacmi1nOFimqMdo4ExBFO0@4fpQEaRCF9uHEnbss9edJDw8zkjC/j8Wdcq@349g2ZOg4e/XT3ulprUvLUGKXWWyNPPGJpRlbvUTyfKsOiUVv3IyUy6y@qazblKBT240@sfR/HrLUGz0j0NmtnpBNZ9vceB7N0MRNJtNghIJZHM3TSjueB2HKf4WCrjSxjV3Vp@OWrDFPb45wfY0In0zchqrxQRgvUl6o@yGLPGiAUJ/4l15w7ifgtWXFERxh5zlHbAS8czYNiHrGugMMZD5k6z7kdODlJS41u3zWUIyG2NQMWVQNRdRlQxW1Jiy6YuiiYmii3gI/NZqiphvKSrDter2eOvW57y2Yz/NzaHcgmN15JRiyOoNmHEJu@ykvCaIklKVL9cjJc8oBtaZ@cUWydeFbFvyrfqq0sLgpGUtHZv/F7LX2WPFP3797@xSLbDLnFb26JVrpVNjVJQFYKLRXd5iltRTaVHRtHVaRG/QuvRr99PzgxXS@HD9@e9j85ekJOotiP0ySKQKuodooCN35VT5yE19Ttrzb0u6Sm7lByIdCVhRaWZoYDTOUIL8/vphhcWS3Wi1HrLD2uZ8m/EhoMxMSKvJeihUww8KE/IutNQxjHu96WAwtYGVtaYTdVgtIE3Y1CTgVdqkKXAQKFRXeEv5NdEv5Aure6xQinb@Op0Haw@3nr34uoZfoANnUQOYJeiYidRfJaAd1sfhT5Nkna/h6O6LaEmXZubkk5bsQ6vsPoKhLyn8GMkceQzWfaoEVo53FBlQhK2hxLHo2UN3JpFV7Qxn@2AQ0C7yB8I9M@MsVPPvYqVbvIOjZzaZjtQzPprTlWGoFlIbsgC2rjgUr7OpGs@bZLa3wKmArIDXJgRtLq/C42nQqjW@4tP8wFIF8eeTHL5N9d3r14zL92P@g//K8igaDWzg29/d@RKj0LSQnG0jYBpMNIuZXkLB7IGH/JyTF7AtNyo0XIStIiKJFGqOMQ5sDEdlteIgALHxYrcK4QfFVOolCGe1Fcbo3DpLJeqnHV9vRzyGfTSJuxY2jORoDkAiXMn4s4BLfWY9XAa8w50WbgzqdDi6NCzv0ua1nM3zTq9hPfMBxH8VcbPLYHpSGTiUnA7uC4cqSrEJQA2GCwJQRscwuOBREmGVfpA7oKiI@CA2RPggdkTGIJiIXIFqIzEBQCZH0qlBgsBV5o1IW2/yvQok6Ro2u0E6vc3ZRfp@tcbqTX7auE9VCRFzPS6KZn7jT1CJtGOdttMrvcO1g/3voRt9Jbw6VD/Pji1dP9p8t4scfQ/39lEXn38s45R7GNb9KfduiL38D "Zsh – TIO Nexus")
Explanation:
The first line is simply answer #5. It does nothing but send the instruction pointer to the bottom line.
`/` turns the fish right, and the characters `^mwfPes{'tc` are put on the stack. A single character of input is read (`i`). (Let's call this character `C` for exposition.) 2 is put in the register (`2&`). Then we jump to the beginning of the second line (line 1) (`01.`).
This line compares `C` to each character on the stack.
A copy of `C` is kept on the bottom of the stack. `{` rotates the stack so `C` is on top; `:` duplicates it; `}` rotates the copy back to the bottom.
We increment the register (`&1+&`) until a match is found.
(So if `C` is "c", the register holds 3 when the match is found; if `C` is "t", the register holds 4, and so on.)
Then we jump to the first character of the line number in the register (`0&.`).
Lines 3 through 13 deal with what to do when `C` is c, t, ', {, etc., respectively. The instruction pointer is moving backwards when we jump; it lands on the first character of the given line, but after a jump it advances a tick before executing, so it begins executing from the end of the line going backward. Each line pushes the appropriate language number on the stack, then sends the fish down to the `n` instruction, which prints it out.
`^` is the most complicated case, because of my own dastardliness with the first line of this answer. Line 13 reads input until EOF. Then it directs down to line 15, which compares the length of the stack (`l`) to 100 (`aa*`). If it is longer (`)?`), we add `+` `b` and `1` to get 12, this language; otherwise, 1 remains on top of the stack.
[Answer]
# 4, JavaScript (ES6), 32 bytes
```
s=>s?s[0]==`{`?2:s[0]==`s`?4:3:1
```
Outputs 1 for an empty input, 2 if the input starts with a `{`, 4 if it starts with an `s` and 3 otherwise..
[Answer]
# 11. Mathematica [language 7], 53 bytes
```
Position[Characters@"^{'sceP",#&@@#][[1,1]]/._@__->1&
```
Unnamed function taking a list of characters as its argument and outputting a positive integer. Simply branches on the first letter of the input, using its position in the string `"^{'sceP"` to decide on the output. This gives the right answer for all previous submissions except [the initial empty Retina program](https://codegolf.stackexchange.com/a/107333/56178) and [the most recent Retina answer](https://codegolf.stackexchange.com/a/107370/56178); both of these spit errors, but the output is repaired by the rule `/._@__->1` which transforms any unevaluated function to `1`.
[Answer]
# 16. [Perl](https://www.perl.org/) (language 9), 94 bytes
```
while(<>){print substr("1234151516748149",index("0F=POmS6D4e_XWVH",chr(47+length($_)%70)),1);}
```
[Try it online!](https://tio.run/nexus/perl#tVPdbtMwFL7PUwS31PbwQv6TpUvSMTS4gkpIgJSmf467ROqf4lSrFPcG7ibtFXgJeKK@yHDbTCCExBWyZH86x/p8zvcdP97lxZyhywjX67JYVirfTHlVImCYlm04crme7Rv2BSDFMmNbBPSbsP9@8cF9bbPR508f3wJC8xLZ3os5W95WOWqP8HNPx5gYuLt7fFTqywghjA9P7OqdPOSGsQLVGu4fvu/vv@4fvik8jHjMEz0Nw3E9js2gwXwc24EVGMqwLVD8LNnff9k//EjxAZwfkBi8CkW9U@ikQvyuqGiOmg5KNsnmxZIhWYmshYAahCYBEIQWARyENgEUhI5M4X@xi8HUUWgopZL0FAFwIDtQHYgONDgM//4q7hYzNucMNeJQTKgMK22xG9QiCWCaDFOYCjKYGgrbrstGf/U3/YHaRsfU0QAVWK4z8zOqsylQx4vM4ZuFoJtKPaeGOcaqobbeKP0VL6pitUyu80k5oRUreQ8Ma8gp6wPS6vR6rTRJZIVp@lIb9Uaj88joyBYjGtOj8pDB2A0a3IZCNHAIY@MpTGGnQ7VTZ5GvS6eaRB/G3q9LsfOEayidbTCHJ2e7yqxcLdR8wvN5MVWLxXpVVmfd4zD@MYUgAROHGbMLy6WZ50@BdhpJnk9Mx0XFcr2pENbYkq4yaQDWcrbNilvGZTSx7BSnuPVOgYkq5y49GbDqBUcHqDzFkB59EMYgE22lCiNUm3ZgEt8NLOIENvGswCGuLzfPDjxiBy7xLmTcCHzieoG9w0miaVqVaiXLNpQhVEq7CxxG5VkxpBqVZlzL2q4qpGOi446@dW5SIQzl//7Cnw "Perl – TIO Nexus") (checks all answers). Outputs "1234151516748149"
This prints:
* 1 with answers 1, 5, 7, 9 and 14 (Retina).
* 2 with answer 2 (Brain-Flak).
* 3 with answer 3 (APL).
* 4 with answers 4, 12 and 15 (Javascript).
* 5 with answers 6 and 8 (R).
* 6 with answer 10 (Bash).
* 7 with answer 11 (Mathematica).
* 8 with answer 13 (Python).
* 9 with this answer (Perl).
The program checks input length and maps it to the current language distribution.
[Answer]
# 6. R (language 5), 61 bytes
```
cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
```
Checks what is the first character of the input and choose output accordingly.
This thus prints:
* `1` with answers [1](https://codegolf.stackexchange.com/a/107333/6741) and [5](https://codegolf.stackexchange.com/a/107341/6741) (Retina).
* `2` with answer [2](https://codegolf.stackexchange.com/a/107334/6741) (Brain-Flak).
* `3` with answer [3](https://codegolf.stackexchange.com/a/107336/6741) (APL).
* `4` with answer [4](https://codegolf.stackexchange.com/a/107338/6741) (Javascript).
* and `5` with this answer.
Usage:
```
> cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
1
> cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
{<>(())(<>)}{}(<>{}())
2
> cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
' {'⍳⊃⍞
3
> cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
s=>s?s[0]==`{`?2:s[0]==`s`?4:3:1
4
> cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
^$|(?![⊂⍴])[⊂-⍴]|\B=|{}
1
> cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
5
```
[Answer]
# 8. R (language 5), 76 bytes
```
c=which(c("","{","'","s","c")==substr(readline(),1,1));ifelse(length(c),c,1)
```
Checks the first letter of the input, and compares it with a vector containing (in that order) the empty string, `{`, `'`, `s` and `c`. It then outputs the index of the match (R indexing is 1-based) or 1 if there is no match.
Same concept as answer n°[6](https://codegolf.stackexchange.com/a/107346/6741) but prevents answer n°[7](https://codegolf.stackexchange.com/a/107350/6741) from matching it.
This prints:
* `1` with answers [1](https://codegolf.stackexchange.com/a/107333/6741), [5](https://codegolf.stackexchange.com/a/107341/6741) and [7](https://codegolf.stackexchange.com/a/107350/6741) (Retina).
* `2` with answer [2](https://codegolf.stackexchange.com/a/107334/6741) (Brain-Flak).
* `3` with answer [3](https://codegolf.stackexchange.com/a/107336/6741) (APL).
* `4` with answer [4](https://codegolf.stackexchange.com/a/107338/6741) (Javascript).
* and `5` with answer [6](https://codegolf.stackexchange.com/a/107346/6741) and this answer (R).
If I'm not mistaken, the byte-count allowance for this answer was 94 bytes.
[Answer]
# 12. Javascript (language 4), 117 bytes
Note: I changed a character to correct a mistake in this one.
```
c=>c?c[0]=='e'?6:c[0]=='$'||c[0]=='^'?1:c[0]=='c'&&c.length>80?4:c[0]=='P'?7:c[0]=='c'?5:c[0]=='{'?2:c[0]=='s'?4:3:1;
```
Checks the first letter of the input, if it's c, checks the length of the input.
Outputs:
* 1 for answers 1, 5, 7, 9
* 2 for answer 2
* 3 for answer 3
* 4 for answer 4 and this answer
* 5 for answers 6, 8
* 6 for answer 10
* 7 for answer 11
[Answer]
# 13. [Python](https://docs.python.org/3.5/) (language 8), 110 bytes
**Note:** This answer was altered 6 hours after posting, at the recommendation of the OP.
```
from hashlib import*;print("1234151516748"["a5e1f936cd78b".index(sha256(input().encode()).hexdigest()[34])])#N
```
This is the same idea as answer 10 (in bash), but in Python 3. (This approach can work for at most 3 more entries before we run out of hex digits.)
This prints:
* `1` with answers [1](https://codegolf.stackexchange.com/a/107333/), [5](https://codegolf.stackexchange.com/a/107341), [7](https://codegolf.stackexchange.com/a/107350), and [9](https://codegolf.stackexchange.com/a/107370) (Retina).
* `2` with answer [2](https://codegolf.stackexchange.com/a/107334) (Brain-Flak).
* `3` with answer [3](https://codegolf.stackexchange.com/a/107336) (APL).
* `4` with answers [4](https://codegolf.stackexchange.com/a/107338) and [12](https://codegolf.stackexchange.com/a/107422) (Javascript).
* `5` with answers [6](https://codegolf.stackexchange.com/a/107346) and [8](https://codegolf.stackexchange.com/a/107364) (R).
* `6` with answer [10](https://codegolf.stackexchange.com/a/107388) (Bash).
* `7` with answer [11](https://codegolf.stackexchange.com/a/107403) (Mathematica).
* `8` for this answer (Python).
Try it online! for: [Answer 1](https://tio.run/nexus/python3#DchLDoMgFADAfU9h6Aa6IEE@2vQOXsC4QHmWl1QggIm3p2Z20/Ycj87b4n@4dnikmOvrkzKGSonopRL6ZgY1kplYDWJ/S7O5YVwJx@DgosXbXhuKIZ2VMg5hiw4oY9zD5fAL5d5ZqoUt7Dm19vgD "Python 3 – TIO Nexus"),
[Answer 2](https://tio.run/nexus/python3#DYlbCoMwEEW3IunPTD8ENT5KxSV0A@KHmrEZ0BiSFARx7TZcOAfOvRe3b4kevV55SnizuwvPt3VsAogsL2RWxlW1bEQvxpKy5VVUs6qbSaRsFB3g9ZiXFbCxvwCYkpl3RYCYajoUf8nH2hdywAEfn/s@2w7iC22H13lFRSD@AQ "Python 3 – TIO Nexus"),
[Answer 3](https://tio.run/nexus/python3#@59WlJ@rkJFYnJGTmaSQmVuQX1SiZV1QlJlXoqFkaGRsYmgKhGbmJhZK0UqJpqmGaZbGZskp5hZJSnqZeSmpFRrFGYlGpmYamXkFpSUamnqpecn5Kakampp6GakVKZnpqcVA0Whjk1jNWE1lv///1RWq1R/1bn7U1fyodx4A "Python 3 – TIO Nexus"),
[Answer 4](https://tio.run/nexus/python3#LchLCsMgFEDRrQQ70Q6kRvNpSuoOuoEg5KOJQmMkz0Kgi7cZlDs53DTv25rZAezbjZlbw7bH6yPszkeMWM4FK87KStSoQ0Nh2Hzn5aSrekTUeW0ODHbIixI7Hz4RE2r8tGmDCaHWHNotBs7bcaGIIpdXStA@QUJ3U23bf3uZN39DL0XDG/YD "Python 3 – TIO Nexus"),
[Answer 5](https://tio.run/nexus/python3#@59WlJ@rkJFYnJGTmaSQmVuQX1SiZV1QlJlXoqFkaGRsYmgKhGbmJhZK0UqJpqmGaZbGZskp5hZJSnqZeSmpFRrFGYlGpmYamXkFpSUamnqpecn5Kakampp6GakVKZnpqcVA0Whjk1jNWE1lv///41RqNOwVox91NT3q3RKrCWLoglg1MU62NdW1AA "Python 3 – TIO Nexus"),
[Answer 6](https://tio.run/nexus/python3#DYvRCoMgFEB/Je4epkMCU6sx/IX9QPRgalMoCzUW7OObnLdzONcct7VyKrnFT5Vf9y3mx2uPPmQEtGGcikLb8R4GUMLS@clabbp@gtoHY0@UnGpEi3zYj4xwbYPejEUY186exn9sKnZgfMQjvr2vS6uM0tdn7VA6ppQjilaZxYfyEEooJvAD2RC4g2QEEkhOQIMUJeE/ "Python 3 – TIO Nexus"),
[Answer 7](https://tio.run/nexus/python3#@59WlJ@rkJFYnJGTmaSQmVuQX1SiZV1QlJlXoqFkaGRsYmgKhGbmJhZK0UqJpqmGaZbGZskp5hZJSnqZeSmpFRrFGYlGpmYamXkFpSUamnqpecn5Kakampp6GakVKZnpqcVA0Whjk1jNWE1lv///41RqNOwVox91NT3q3RKrCWLoglg1MU62NdW1NTFJpgA "Python 3 – TIO Nexus"),
[Answer 8](https://tio.run/nexus/python3#DYxbCsIwEEW3IvHDGQmF2KeUbsENiB9pMjUDbVqSFAUXX8Pl/Bw495jCupycjm7m8cTLtoZ07bfAPoFQt7JSdV7TVp14Cl2Tmu5lY2zbjaJgb@kL0elb3QD7bU@ABXmzWgLEwtHX8ptits@yeuELz4/jMMPHsXFgQAgpfplLJmaMwGGI@xhTgEDazuzzj1RSIfY80RwJZvLvlGOUJus/ "Python 3 – TIO Nexus"),
[Answer 9](https://tio.run/nexus/python3#DchRCoMgAADQq4QbpGMEllnb7rALmINMS2GpqINg7uwt3t/b5@DWQo9Rv40ozOpdSJeHD8YmCHDdENweaEd6wMDYKjzfGjrJrhegMlaqDUY91i2FxvpPgqhSdnJSQYQqrTZpFhWPZQ3hiKPTc9/P@Td8M7uXnL14yfN1EPgP "Python 3 – TIO Nexus"),
[Answer 10](https://tio.run/nexus/python3#TY1LCoMwFEW38kg7SAqVxhi1dAGddQMiaD7WQBNDPuCge7fiqNzZOXDuNoXFwjzG@WMEGOuXkC4PH4xLGNGSVZTvq5uqRR0auabTndVSNa1AhXFKrzjOY8lrbJzPCZNCO7kojQkpZr0q89Zxpx2retKT02vb9OoDxCxiCvB3gOCMD3VEAbGaT62SNy0QDFbxmO1X5gRXScuBAIXT8wc "Python 3 – TIO Nexus"),
[Answer 11](https://tio.run/nexus/python3#DcjbCsIgAADQXxkOlsYybNcIYtB77F1sOHUpNB1qMOjj1zhvZ5u8mxPNg/6YMTHz4nw83hZvbISAXIqSVLu6KVtAAa8Uma5FLWTTjgAbK9UKg@aXqobGLt8IEVZWOKkgQlirVZq3CvvSomSIofS5bb0LJhpn6UNzz0VUPnTg9TsEoXqQp1nXpYxSkhPGznjohuF0J9kf "Python 3 – TIO Nexus"),
[Answer 12](https://tio.run/nexus/python3#RYrRDkMwAEV/ZekWbfcgimKE/sGyd7GEKm1CCZZI5t/Ng2a5Lyfnnr2Zhv4iy1l2qrqofhym5Z6Mk9ILAsT1fEKPBaEfgRyUVJDm4QW8DqMK2ErXYkWzLF0aIKXHz4KwLTQfaoEwtqVYa9WK@bC55xe4wNfnvvM044znTpGmUEAWxCff4Lad@IaMGM2hZXG7E7pdZBY5zDfHC7LwHzFq@AuZa3iGR@/FJPkB "Python 3 – TIO Nexus"), or
[this answer](https://tio.run/nexus/python3#vc1LDoMgFEDRrRg6gQ5IkI823UM3YBygPMtLKhCgibtHV2Hu7Exu23LcO2@L/@HS4Z5irs93yhgqJaKXSugrM6iRTMRqENtLmtUN40I4BgcHLd722lAM6V8p4xDW6IAyxj0cDr9QLp2kmtnMHp/W7v2d "Python 3 – TIO Nexus").
[Answer]
# 24. [Zsh](https://www.zsh.org/) (language 11), 142 bytes
My previous answer #18 in C still works unmodified for all the subsequent entries ([demo](https://tio.run/nexus/bash#xZTdbts2FMfv9RQs7VqiQ6ui9S1HlpN0Wbdkqbtu3VZZTmSKtgXYkifJSQrJN9tdgb7CXmJ7orxIR9nuR9YCBQYMgwDykEc64vmf3yENC9AHizCZ5TIFh4fgq6enb5dhnEgJKuk8zNrXLgTjEuSADac3S4gnvm3bAW7T3owVuTRBPermRUbnmXSN23yZ1MsFS2rXKouTYirBhxHEiUc92rl2kr5texqfDMXT@UR0jziqQ1Bv85b/XZhRCjopWETvjiVM0wwkIE5AqRBZ7qqbHohSwOg8BZ0ENBMAAewB@dEi6m13a3fC3grlYV@SEJIO@2hTbvjEB4QEEZTi3Zs/717/fvfmDyF3@7mX@0rgulflldd19nZ@xQ/JjyWMm5XkPfDvXv929@avANVGp7aq0bFblRuBhoWU38QFnUv5esJzlzIWRos4YRLCBBOEYQndLoYidFUMc@hqGFLo6tyFvhS9Gk10gbo385iHpxKEdbA6VB2oDoNc9/N/Rb14yhY5k3gpZgX/GGHKt4VmtRmVle@IgT8OxKDCowkR2O0qA7s4AJKuqhGdPwYETWnripOI3QKoGvrUiqjCJhBcLSM9Xy8rui5Ah5LuFQIENL4WhmkeF3Ga@CecnpAWLMsHcFyKOWVDiButwaAR@D4/YRA8ki8Hl5edPmnxFPucjq3yIhM9w9nbTbGq9uZY5JzsbSq2WlTeZda3FF6pvWMoeuaHlzhfe7sUeWX3di7uKtsTplm6BPMwny/iCYiXqzQr2jtmpY9UMDUL@jDUGZnaqkEj05pAeauIlM/Drm5IcbJaFxKSWULTiBcAyXN2G8UzlvNdX9UCFKDGhSD6gHMX7AqQDpxtBSifqzHd1qEio6hqCoXbl8qu5nSxZTgq1h0Nm6qjY8Pig6k5JtYcA5s23yeOhQ3T0TbI92VZLgI5Y9GaMknKeLlj5Pazdjymct3KJ/xsR4WkIKyglnKrnwZVRQSO1oLVLVJuE99T8I/8iWZDvEsZKqfu8OnyufFYY5c///TiCcR172vmwR605iV6aCqIU8g7@h5Zhq0RSzONbVhN7ZL7eHWHxez46SK7nj5@cWK9fHIOrtIVS/J8AThroDOJkzB7VU3CnBnanrs9drfC/3ZnfQD@h/Q98rXUg@cFjzR7vlrExQD2Lr7/sQmegWPgEwe45@BbDPSHQAUN0If4uzTyz7fyDRpYt7GqBu@apHVfQvPoCyqaivavhaxAxO9eRozYW4HGeicqKmssznDkc9SDUtn0dshIZy5Xs9abA//A5Vc3ivyz4ODgnoKRb1mBZzuRT4gdeHqbG1014GtVDzw@cq/pWJ3It416V@Nrjc@GEvCOJQf8dd0K2t1PWDr6shSxenvKVs/yo3Dx6pvr4tfhL@bLiwMwGr2XY9e/n1eEKJ9Kcr6ThO402SnifiQJ/Ywk9D@U5G8)). So let's mix it up a little.
```
typeset -A p
p=("[\$^]*|'\[*" 1 '{*' 2 "' *" 3 '?=>*' 4 'c?[wt]*' 5 'e*' 6 'P*' 7 'f*' 8 'w*' 9 'm*' 10 'ty*' 11)
echo ${p[(k)$1]:-1} #@<`w&X{
```
The purpose of the comment at the end is to match the length of answers 21 and 23,
and ensure that no single character of the sha256 or sha384 hashes is unique for every answer so far,
using the characters checked by Lyth's C++ answers. ;-)
This prints:
* `1` with answers [1](https://codegolf.stackexchange.com/a/107333/18314), [5](https://codegolf.stackexchange.com/a/107341/18314), [7](https://codegolf.stackexchange.com/a/107350/18314), [9](https://codegolf.stackexchange.com/a/107370/18314), and [14](https://codegolf.stackexchange.com/a/107479/18314) (Retina).
* `2` with answer [2](https://codegolf.stackexchange.com/a/107334/18314) (Brain-Flak).
* `3` with answer [3](https://codegolf.stackexchange.com/a/107336/18314) (APL).
* `4` with answers [4](https://codegolf.stackexchange.com/a/107338/18314), [12](https://codegolf.stackexchange.com/a/107422/18314), and [15](https://codegolf.stackexchange.com/a/107495/18314) (Javascript).
* `5` with answers [6](https://codegolf.stackexchange.com/a/107346/18314) and [8](https://codegolf.stackexchange.com/a/107364/18314) (R).
* `6` with answers [10](https://codegolf.stackexchange.com/a/107388/18314), [17](https://codegolf.stackexchange.com/a/107542/18314), [20](https://codegolf.stackexchange.com/a/107579/18314), and [22](https://codegolf.stackexchange.com/a/107818/18314) (Bash).
* `7` with answers [11](https://codegolf.stackexchange.com/a/107403/18314) and [19](https://codegolf.stackexchange.com/a/107575/18314) (Mathematica).
* `8` with answer [13](https://codegolf.stackexchange.com/a/107443/18314) (Python).
* `9` with answer [16](https://codegolf.stackexchange.com/a/107511/18314) (Perl).
* `10` with answers [18](https://codegolf.stackexchange.com/a/107567/18314), [21](https://codegolf.stackexchange.com/a/107817/18314), and [23](https://codegolf.stackexchange.com/a/107936/18314) (C/C++).
* `11` with this answer (Zsh).
[Try it online!](https://tio.run/nexus/zsh#tVXdkto2FL73UyiCIIk11MZ/2KxtNkm3abNNSNOmaYxZQBaLp2Co7f2rzU17l5m8Ql@ifaJ9kfQY2DTbZCYznel4RufTkXx8znc@WXySIw8tovav2RwdHpIvnx2Td/n1WmQiR60jtJbWLsXBsD4KmyUZBk2MVESKJkEdhAmCqYaI73rg0BHhfnCZh4ANRAQYE5EBGAuRGZguIpdgbESWYFQFkfy6AiqTBJ@vUL1YB/RnVldDp6VuUK1/OL5svCreQU4S3@U5Sc6y2zQlqTj0KGWMHnpsU2zAwMCYRFBBbt7@efPm95u3f0iZ62V@Fiih646Lsd9x9jgb@7qjOao0qpfUvxfcvPnt5u1fIatAq0Ll8IFbFpvq0zS7jHM@p9n5NMtTmopJtIgTQZmsyiqTcYHdjowJdjUZZ9jVZcyxa8AS@1z0cjg1JO5ezmMIzynGVbAqVBWoCsNc99NfZb14JhaZoAuRnOXwMpM5uKV6uRkWZeCQMBiFJCzl4VSVxNU6Rbs4CKsdTVcNeEyM6nS7FCeRuEJYM41ZN@KKmGI0XkZGdr4s@TkIgaudMYPO176SBqsszuNVEjycT9IJz0Wa9fGoIBkXAyzXGv1@LQwCyDAMv2if9k9PW57agBI97vMt80QQ33T2uE7Kcg9HxFdv3Zw0Gry9q8zrKtCp/cKA@NY/m3zjFhcEOrvHGdl1tifN0tUSzSfZfBFPUbxcr9K82VuncZLTD1iw9C4O8MQQ6szWTB5Z3Slubxmh2XzSMUwaJ@vznLK2SPgqggaw9lxcRfGZyMAbaHrIQlZ7KpEAge7CXQNWfWfbAQ62HPFtH0p1GJV1KXc9WnR0pyN3TUeTDUeXLc0xZLMLg6U7lqw7pmzZ4Fedrmxajr5hQdBut/OwnYronAtKU2h3zFwvbcYj3ubQjIeQ21FOFSYrrKFcGcdhWaoSSGshqiNSbAvfq@Bf9au6jeVdyVg5dgfPli/MR7o4ffXjy8dY5vOU6tbBXmj1U3bfUhiokPU2d5Rl2rra1S1zG1bXOupdeXUG@dmDZ4v0Yvbo5cPu68cnaLxaiyTLFgi0hlrTOJmk1@V0kglT3@tuL7sraTmJE5qwoiq0eeFiNCpQhsRgdrnE8jSwbTuUm7x3JvKMTlmPu5BQlfeF3IRpUk0h/2ppS8OM4vsRlhMfVNm6cBLPtkE0iWcqoKnEUw3QIkioqvC94L9fvZd8RXX/RQ6Rzl6sF3Hex72n3/1QR8/RAxSoDnJP0DcyMu7D37GGPCx/u4qCky19/Zps2LKmhbeHpHGXQuvoMyxaiv6fiSxRxFFLqGbsr1HtfEcqKypZPJGjAKQeFsqmt5MMfeICmxXfIPh7LvxyWRQ8CQ8O7jAYBd1u6NtOFKiqHfpGE0BHC2GuGaEPI6xaTrcVBbZZeXWY62BNJYQTqx7AdqMbNjsfaeno81TE2tWxWD/PjiaL668v8l8GP1mvnx6g4fA9Hbvz@2lGVOVjSk52lPAdJztG3A8o4Z@ghP@flFR332yVohmUjHC9oDOG6/RwexEyvMFStELV1b2/wXF9VrkSId1xwgtbyPC7vwE "Zsh – TIO Nexus")
[Answer]
## 14. [Retina](https://github.com/m-ender/retina) (language 1), 39 bytes
```
'[ ⍳]|}\{|[o@:][^]'c@:]|^c|,\b1|1\d|$
```
[Try it online!](https://tio.run/nexus/retina#jZJBjtowFIb3OYVrKLarwGBCgIZJgtrF7Cr2IZDEMRNLkKA4aJBiNu1uJK7QS7Qn4iLUAUbtolIrS/av9@zPfv/ze/wUXVAAzqcfoTouahUUMycMliFielVLpsxFQhVdpKp9uRj1o4cxIfjRI8f6qBc9EWIgUCNNOL9@O5@@G9L1pC@Dfui6UR35A@euZeQPHcuhxrKtsP8uOL9@PZ9@hqQR3UapxSdX1UeDxRWWL6JiGZb7RFYlLnmcbkTOMTGpSYkJa@gOTIiga5lQQndoQgZdW6fIv@hqkdgGc18yofEMQ9jAGlQDajDEdf9@K5mKNd9Ijjc8f670YWIyHTbaN@McdPUtvDpm8MOuBDcOgHRgDamtxwiCNr6mRJ7yA4DWyF5PUtbnCQTRNrXlfqvYvgJdRgcRARS0nox5IUUlijz4nMVlzCpeyhlc1kgyPodmqzObtcIg0C8Mw4fearZadT3a0SV6zGdX5xFH/si56zZS6i6XyKdvYYY6Hda7VeZN@rpT98Qc@ePfm3z7TddId/auJbp1dmqsy2ILslhmG5EAsd0VZfVhuitFXuE/XBgPJzCAsc3p@qM1Yul4ksDe1REss3hgj7DId/sKkx7PWZHqBpBexg@peOZSRwNrGJKQtL4Y//lzfwE "Retina – TIO Nexus") (Tests all valid inputs.)
[Answer]
# 15. Javascript (language 4), 108 bytes
**Golfed**
```
t=>({24:2,86:3,5:4,73:5,68:5,74:7,4:6,79:4,1:8,67:4})[[...t].reduce((r,c,i)=>r*i^c.charCodeAt(0),0)&0x5F]||1
```
[Answer]
# 17. Bash (+coreutils +openssl) (language 6), 103 bytes
**Golfed**
```
expr substr 69418476151514321 $(expr index 2PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1 #x
```
Uses the same technique as my [answer #10](https://codegolf.stackexchange.com/a/107388/61904), but with *Base64* encoded dictionary, instead of *Hex*.
I've put together the following data file for testing:
```
6 17 expr substr 69418476151514321 $(expr index 2PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1 #x
9 16 while(<>){print substr("1234151516748149",index("0F=POmS6D4e_XWVH",chr(47+length($_)%70)),1);}
4 15 t=>({24:2,86:3,5:4,73:5,68:5,74:7,4:6,79:4,1:8,67:4})[[...t].reduce((r,c,i)=>r*i^c.charCodeAt(0),0)&0x5F]||1
1 14 '[ ⍳]|}\{|[o@:][^]'c@:]|^c|,\b1|1\d|$
8 13 from hashlib import*;print("1234151516748"["a5e1f936cd78b".index(sha256(input().encode()).hexdigest()[34])])#N
4 12 c=>c?c[0]=='e'?6:c[0]=='$'||c[0]=='^'?1:c[0]=='c'&&c.length>80?4:c[0]=='P'?7:c[0]=='c'?5:c[0]=='{'?2:c[0]=='s'?4:3:1;
7 11 Position[Characters@"^{'sceP",#&@@#][[1,1]]/._@__->1&
6 10 expr substr "1234151516" $(expr index "365f8dc0eb" `md5sum|cut -c12`) 1 #G
1 09 $|}\{|[:'][^]']|,\b1
5 08 c=which(c("","{","'","s","c")==substr(readline(),1,1));ifelse(length(c),c,1)
1 07 ^$|(?![⊂⍴])[⊂-⍴]|\B=|{}|\b5
5 06 cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
1 05 ^$|(?![⊂⍴])[⊂-⍴]|\B=|{}
4 04 s=>s?s[0]==`{`?2:s[0]==`s`?4:3:1
3 03 ' {'⍳⊃⍞
2 02 {<>(())(<>)}{}(<>{}())
1 01
```
**Test**
```
for i in `seq 17`
do
  echo -n `cat lchain|sed -n $i'{p;q}'|cut -c1`=\>
  cat lchain|sed -n $i'{p;q}'|cut -c6-|\
  expr substr 69418476151514321 $(expr index 2PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1 #x
done
6=>6
9=>9
4=>4
1=>1
8=>8
4=>4
7=>7
6=>6
1=>1
5=>5
1=>1
5=>5
1=>1
4=>4
3=>3
2=>2
1=>1
```
[Answer]
# 19. Mathematica (language 7), 96 bytes
```
Position[ToCharacterCode@StringSplit@";NRU$ Q B [1: =L J, 5% 3 # >",Mod[Length@#,59,33]][[1,1]]&
```
Unnamed function taking a list of characters as input and returning an integer:
* `1` with answers [1](https://codegolf.stackexchange.com/a/107333/), [5](https://codegolf.stackexchange.com/a/107341), [7](https://codegolf.stackexchange.com/a/107350), [9](https://codegolf.stackexchange.com/a/107370), and [14](https://codegolf.stackexchange.com/a/107479) (Retina).
* `2` with answer [2](https://codegolf.stackexchange.com/a/107334) (Brain-Flak).
* `3` with answer [3](https://codegolf.stackexchange.com/a/107336) (APL).
* `4` with answers [4](https://codegolf.stackexchange.com/a/107338), [12](https://codegolf.stackexchange.com/a/107422), and [15](https://codegolf.stackexchange.com/a/107495) (Javascript).
* `5` with answers [6](https://codegolf.stackexchange.com/a/107346) and [8](https://codegolf.stackexchange.com/a/107364) (R).
* `6` with answers [10](https://codegolf.stackexchange.com/a/107388) and [17](https://codegolf.stackexchange.com/a/107542) (Bash).
* `7` with answer [11](https://codegolf.stackexchange.com/a/107403) and this answer (Mathematica).
* `8` with answer [13](https://codegolf.stackexchange.com/a/107443) (Python).
* `9` with answer [16](https://codegolf.stackexchange.com/a/107511) (Perl).
* `10` with answer [18](https://codegolf.stackexchange.com/a/107567/56178) (C).
So far all the lengths of answers are distinct, and they're even distinct modulo 59—hence can be detected by which integer in the range 33, 34, ..., 91 they're congruent to (mod 59). These are all printable ASCII characters, encoded by the string `";NRU$ Q B [1: =L J, 5% 3 # >"`; using `ToCharacterCode@StringSplit@` turns this string into a list of ten lists of integers in that range, and `Position[...,Mod[Length@#,59,33]][[1,1]]` finds which of the ten sublists matches the modified length of the input.
[Answer]
# 20. Bash (+coreutils +openssl) (language 6), 121 byte
**Golfed**
```
expr substr 67A69418476151514321 $(expr index 7042PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1| dc -e16i?p #u
```
The same method as my answer [#17](https://codegolf.stackexchange.com/a/107542/61904) (which in turn is based on my original answer [#10](https://codegolf.stackexchange.com/a/107388/61904)).
As we have 10 distinct languages now, I've switched to hexadecimal position encoding.
**Data**
```
6 20 expr substr 67A69418476151514321 $(expr index 7042PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1| dc -e16i?p #u
7 19 Position[ToCharacterCode@StringSplit@";NRU$ Q B [1: =L J, 5% 3 # >",Mod[Length@#,59,33]][[1,1]]&
A 18 main(n){char*v=" ^{ s ePfwm",b[999],*c;gets(b);c=strchr(v,*b);n=strlen(b);printf("%d",n?c?c-v:n>99?4:n>60?5:n>15?1:3:1);}
6 17 expr substr 69418476151514321 $(expr index 2PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1 #x
9 16 while(<>){print substr("1234151516748149",index("0F=POmS6D4e_XWVH",chr(47+length($_)%70)),1);}
4 15 t=>({24:2,86:3,5:4,73:5,68:5,74:7,4:6,79:4,1:8,67:4})[[...t].reduce((r,c,i)=>r*i^c.charCodeAt(0),0)&0x5F]||1
1 14 '[ ⍳]|}\{|[o@:][^]'c@:]|^c|,\b1|1\d|$
8 13 from hashlib import*;print("1234151516748"["a5e1f936cd78b".index(sha256(input().encode()).hexdigest()[34])])#N
4 12 c=>c?c[0]=='e'?6:c[0]=='$'||c[0]=='^'?1:c[0]=='c'&&c.length>80?4:c[0]=='P'?7:c[0]=='c'?5:c[0]=='{'?2:c[0]=='s'?4:3:1;
7 11 Position[Characters@"^{'sceP",#&@@#][[1,1]]/._@__->1&
6 10 expr substr "1234151516" $(expr index "365f8dc0eb" `md5sum|cut -c12`) 1 #G
1 09 $|}\{|[:'][^]']|,\b1
5 08 c=which(c("","{","'","s","c")==substr(readline(),1,1));ifelse(length(c),c,1)
1 07 ^$|(?![⊂⍴])[⊂-⍴]|\B=|{}|\b5
5 06 cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
1 05 ^$|(?![⊂⍴])[⊂-⍴]|\B=|{}
4 04 s=>s?s[0]==`{`?2:s[0]==`s`?4:3:1
3 03 ' {'⍳⊃⍞
2 02 {<>(())(<>)}{}(<>{}())
1 01
```
**Test (output)**
```
./test
6=>6
7=>7
A=>10
6=>6
9=>9
4=>4
1=>1
8=>8
4=>4
7=>7
6=>6
1=>1
5=>5
1=>1
5=>5
1=>1
4=>4
3=>3
2=>2
```
[Answer]
# 23. [C (gcc)](https://gcc.gnu.org/) (language 10), 142 bytes
```
main(c){int d[256]={0};while((c=getchar())!=EOF)d[c]++;printf("%d",d[88]?9:d[119]?5*d[123]:d[35]?d[38]?7:8-d[96]:d[48]?4:d[60]?2:1+d[158]*2);}
```
[Try it online!](https://tio.run/nexus/c-gcc#zU5LDoIwEL0KakxaUAOFYgGxK916gGYWpIPSBNEgxgXh7Djews37ziRv5TrbvrH2Dq8B3WPXHOd75Tpm@ei6wUMjZArlGE7Fp3FtzZgtb/Vgm6pnnC/K0@XM0VgIguLZ08OVLde43KBRCnSWo4miDLT0SYgYyMcSNCG1@1xt0WTpL03IJ8RpCFrkUUDnUoEveDHNf7bnCw "C (gcc) – TIO Nexus")
* `1` with answers [1](https://codegolf.stackexchange.com/a/107333/), [5](https://codegolf.stackexchange.com/a/107341), [7](https://codegolf.stackexchange.com/a/107350), [9](https://codegolf.stackexchange.com/a/107370), and [14](https://codegolf.stackexchange.com/a/107479) (Retina).
* `2` with answer [2](https://codegolf.stackexchange.com/a/107334) (Brain-Flak).
* `3` with answer [3](https://codegolf.stackexchange.com/a/107336) (APL).
* `4` with answers [4](https://codegolf.stackexchange.com/a/107338), [12](https://codegolf.stackexchange.com/a/107422), and [15](https://codegolf.stackexchange.com/a/107495) (Javascript).
* `5` with answers [6](https://codegolf.stackexchange.com/a/107346) and [8](https://codegolf.stackexchange.com/a/107364) (R).
* `6` with answers [10](https://codegolf.stackexchange.com/a/107388), [17](https://codegolf.stackexchange.com/a/107542), [20](https://codegolf.stackexchange.com/a/107579) and [22](https://codegolf.stackexchange.com/a/107818) (Bash).
* `7` with answer [11](https://codegolf.stackexchange.com/a/107403) and [19](https://codegolf.stackexchange.com/a/107575) (Mathematica).
* `8` with answer [13](https://codegolf.stackexchange.com/a/107443) (Python).
* `9` with answer [16](https://codegolf.stackexchange.com/a/107511) (Perl).
* `10` with answer [18](https://codegolf.stackexchange.com/a/107567), [21](https://codegolf.stackexchange.com/a/107817) and this answer (C).
This program counts number of different characters (in ASCII, so multi-byte UTF-8 characters get split into several entries) and then follows a carefully designed decision tree, basing on the number of occurrences of this or that character.
The decision tree is unchanged from #21 (yay!). I'm not allowed to post exactly same code, so we're back to pure C with minor modifications.
[Answer]
# 21. [C++ (gcc)](https://gcc.gnu.org/) (language 10 as a variant of C), 142 bytes
```
main(){int K,d[256]{0};while((K=getchar())!=EOF)d[K]++;printf("%d",d[88]?9:d[119]?5*d[123]:d[35]?d[38]?7:8-d[96]:d[48]?4:d[60]?2:1+d[158]*2);}
```
[Try it online!](https://tio.run/nexus/cpp-gcc#FUtLDoIwEL0KYkxaUAOFYgGxK92w8ADNLAiD0gTRIMYF4ew4bt7/rW1fdx9snON7RPvct6flUdme8cn2o1Nu0QiZwBTM@be1XcNYWdybsW6rgXG@Ks7XC0dTgu/nr4EeN@Zu0KWXUqDTDE0YpqClR0JEQD6SoAmpPWRqhyZN/mlMPiZOAtAiC32aSwWe4Pm8LD8 "C++ (gcc) – TIO Nexus")
* `1` with answers [1](https://codegolf.stackexchange.com/a/107333/), [5](https://codegolf.stackexchange.com/a/107341), [7](https://codegolf.stackexchange.com/a/107350), [9](https://codegolf.stackexchange.com/a/107370), and [14](https://codegolf.stackexchange.com/a/107479) (Retina).
* `2` with answer [2](https://codegolf.stackexchange.com/a/107334) (Brain-Flak).
* `3` with answer [3](https://codegolf.stackexchange.com/a/107336) (APL).
* `4` with answers [4](https://codegolf.stackexchange.com/a/107338), [12](https://codegolf.stackexchange.com/a/107422), and [15](https://codegolf.stackexchange.com/a/107495) (Javascript).
* `5` with answers [6](https://codegolf.stackexchange.com/a/107346) and [8](https://codegolf.stackexchange.com/a/107364) (R).
* `6` with answers [10](https://codegolf.stackexchange.com/a/107388), [17](https://codegolf.stackexchange.com/a/107542) and [20](https://codegolf.stackexchange.com/a/107579) (Bash).
* `7` with answer [11](https://codegolf.stackexchange.com/a/107403) and [19](https://codegolf.stackexchange.com/a/107575) (Mathematica).
* `8` with answer [13](https://codegolf.stackexchange.com/a/107443) (Python).
* `9` with answer [16](https://codegolf.stackexchange.com/a/107511) (Perl).
* `10` with answer [18](https://codegolf.stackexchange.com/a/107567/56178) and this answer (C).
This program counts number of different characters (in ASCII, so multi-byte UTF-8 characters get split into several entries) and then follows a carefully designed decision tree, basing on the number of occurrences of this or that character.
**Trivia**: letter K was not used until this entry. Letters I, E, Y, j, k, q, z remain unused.
[Answer]
# 22. Bash (+coreutils) [language 6], ~~123~~, 131 bytes
EDIT: Published a wrong version at first, should be fixed now.
**Golfed**
```
expr substr 6A67A69418476151514321 $(expr index i3xFepQsAalyIvtqPY7ZN+ \\`openssl sha256 -binary|base64|cut -c10`) 1| dc -e16i?p #L
```
The same technique as my answers #20, #17 and [#10](https://codegolf.stackexchange.com/a/107388/61904).
**Data**
```
6 22 expr substr 6A67A69418476151514321 $(expr index i3xFepQsAalyIvtqPY7ZN+ \\`openssl sha256 -binary|base64|cut -c10`) 1| dc -e16i?p #L
A 21 main(){int K,d[256]{0};while((K=getchar())!=EOF)d[K]++;printf("%d",d[88]?9:d[119]?5*d[123]:d[35]?d[38]?7:8-d[96]:d[48]?4:d[60]?2:1+d[158]*2);}
6 20 expr substr 67A69418476151514321 $(expr index 7042PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1| dc -e16i?p #u
7 19 Position[ToCharacterCode@StringSplit@";NRU$ Q B [1: =L J, 5% 3 # >",Mod[Length@#,59,33]][[1,1]]&
A 18 main(n){char*v=" ^{ s ePfwm",b[999],*c;gets(b);c=strchr(v,*b);n=strlen(b);printf("%d",n?c?c-v:n>99?4:n>60?5:n>15?1:3:1);}
6 17 expr substr 69418476151514321 $(expr index 2PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1 #x
9 16 while(<>){print substr("1234151516748149",index("0F=POmS6D4e_XWVH",chr(47+length($_)%70)),1);}
4 15 t=>({24:2,86:3,5:4,73:5,68:5,74:7,4:6,79:4,1:8,67:4})[[...t].reduce((r,c,i)=>r*i^c.charCodeAt(0),0)&0x5F]||1
1 14 '[ ⍳]|}\{|[o@:][^]'c@:]|^c|,\b1|1\d|$
8 13 from hashlib import*;print("1234151516748"["a5e1f936cd78b".index(sha256(input().encode()).hexdigest()[34])])#N
4 12 c=>c?c[0]=='e'?6:c[0]=='$'||c[0]=='^'?1:c[0]=='c'&&c.length>80?4:c[0]=='P'?7:c[0]=='c'?5:c[0]=='{'?2:c[0]=='s'?4:3:1;
7 11 Position[Characters@"^{'sceP",#&@@#][[1,1]]/._@__->1&
6 10 expr substr "1234151516" $(expr index "365f8dc0eb" `md5sum|cut -c12`) 1 #G
1 09 $|}\{|[:'][^]']|,\b1
5 08 c=which(c("","{","'","s","c")==substr(readline(),1,1));ifelse(length(c),c,1)
1 07 ^$|(?![⊂⍴])[⊂-⍴]|\B=|{}|\b5
5 06 cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
1 05 ^$|(?![⊂⍴])[⊂-⍴]|\B=|{}
4 04 s=>s?s[0]==`{`?2:s[0]==`s`?4:3:1
3 03 ' {'⍳⊃⍞
2 02 {<>(())(<>)}{}(<>{}())
1 01
```
**Test Run**
```
./test
6=>6
A=>10
6=>6
7=>7
A=>10
6=>6
9=>9
4=>4
1=>1
8=>8
4=>4
7=>7
6=>6
1=>1
5=>5
1=>1
5=>5
1=>1
4=>4
3=>3
2=>2
1=>1
```
[Answer]
# 25. Bash (language 6), 169 bytes
The same technique as my answers #22, #20, #17 and [#10](https://codegolf.stackexchange.com/a/107388/61904).
Sorry @Qwerp-Derp ! ;) I promise this is the last one :)
**Golfed**
```
{ echo -n 'addsomesalt?';cat; }|expr substr 6BA6A67A69418476151514321 $(expr index 1W0TC4YrKwRGAJupDqn7Xlcog \\`openssl sha256 -binary|base64|cut -c40`) 1| dc -e16i?p #8
```
**Data**
> 
> Note that newlines are encoded as \n for answer #24
> 
> 
> 
```
6 25 { echo -n 'addsomesalt?';cat; }|expr substr 6BA6A67A69418476151514321 $(expr index 1W0TC4YrKwRGAJupDqn7Xlcog \\`openssl sha256 -binary|base64|cut -c40`) 1| dc -e16i?p #8
B 24 typeset -A p\np=("[\$^]*|'\[*" 1 '{*' 2 "' *" 3 '?=>*' 4 'c?[wt]*' 5 'e*' 6 'P*' 7 'f*' 8 'w*' 9 'm*' 10 'ty*' 11)\necho ${p[(k)$1]:-1} #@<`w&X{
A 23 main(c){int d[256]={0};while((c=getchar())!=EOF)d[c]++;printf("%d",d[88]?9:d[119]?5*d[123]:d[35]?d[38]?7:8-d[96]:d[48]?4:d[60]?2:1+d[158]*2);}
6 22 expr substr 6A67A69418476151514321 $(expr index i3xFepQsAalyIvtqPY7ZN+ \\`openssl sha256 -binary|base64|cut -c10`) 1| dc -e16i?p #L
A 21 main(){int K,d[256]{0};while((K=getchar())!=EOF)d[K]++;printf("%d",d[88]?9:d[119]?5*d[123]:d[35]?d[38]?7:8-d[96]:d[48]?4:d[60]?2:1+d[158]*2);}
6 20 expr substr 67A69418476151514321 $(expr index 7042PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1| dc -e16i?p #u
7 19 Position[ToCharacterCode@StringSplit@";NRU$ Q B [1: =L J, 5% 3 # >",Mod[Length@#,59,33]][[1,1]]&
A 18 main(n){char*v=" ^{ s ePfwm",b[999],*c;gets(b);c=strchr(v,*b);n=strlen(b);printf("%d",n?c?c-v:n>99?4:n>60?5:n>15?1:3:1);}
6 17 expr substr 69418476151514321 $(expr index 2PtgBOlrvfDVC8ZHL `openssl md5 -binary|base64|cut -c2`) 1 #x
9 16 while(<>){print substr("1234151516748149",index("0F=POmS6D4e_XWVH",chr(47+length($_)%70)),1);}
4 15 t=>({24:2,86:3,5:4,73:5,68:5,74:7,4:6,79:4,1:8,67:4})[[...t].reduce((r,c,i)=>r*i^c.charCodeAt(0),0)&0x5F]||1
1 14 '[ ⍳]|}\{|[o@:][^]'c@:]|^c|,\b1|1\d|$
8 13 from hashlib import*;print("1234151516748"["a5e1f936cd78b".index(sha256(input().encode()).hexdigest()[34])])#N
4 12 c=>c?c[0]=='e'?6:c[0]=='$'||c[0]=='^'?1:c[0]=='c'&&c.length>80?4:c[0]=='P'?7:c[0]=='c'?5:c[0]=='{'?2:c[0]=='s'?4:3:1;
7 11 Position[Characters@"^{'sceP",#&@@#][[1,1]]/._@__->1&
6 10 expr substr "1234151516" $(expr index "365f8dc0eb" `md5sum|cut -c12`) 1 #G
1 09 $|}\{|[:'][^]']|,\b1
5 08 c=which(c("","{","'","s","c")==substr(readline(),1,1));ifelse(length(c),c,1)
1 07 ^$|(?![⊂⍴])[⊂-⍴]|\B=|{}|\b5
5 06 cat(switch(substr(readline(),1,1),"{"=2,"'"=3,"s"=4,"c"=5,1))
1 05 ^$|(?![⊂⍴])[⊂-⍴]|\B=|{}
4 04 s=>s?s[0]==`{`?2:s[0]==`s`?4:3:1
3 03 ' {'⍳⊃⍞
2 02 {<>(())(<>)}{}(<>{}())
1 01
```
**Test Output**
```
6=>6
B=>11
A=>10
6=>6
A=>10
6=>6
7=>7
A=>10
6=>6
9=>9
4=>4
1=>1
8=>8
4=>4
7=>7
6=>6
1=>1
5=>5
1=>1
5=>5
1=>1
4=>4
3=>3
2=>2
1=>1
```
]