# Don't clear your terminal history

You woke up this morning locked in a room. The only apparent exit is a door with a terminal. On the screen you see the following:

> einn
Access granted. Door opened.
> três
Access granted. Door opened.
> dhá
Access granted. Door opened.
> seis
Access granted. Door opened.
> seven
Access granted. Door opened.
> cinq
Access granted. Door opened.
> vier
Access granted. Door opened.
>


The last line seems to be waiting for some input from you...

-
The next numerical value should perhaps be 12, as 1,3,2,6,7,5,4,12 occur in this order in the 4-bit Gray code. But I do not see a pattern in the languages. – Gamow Mar 7 at 18:05
@Gamow It's also missing zero and could be a 3-bit gray code, although I'll grant that wouldn't really make sense given the current order. – Parthian Shot Mar 7 at 18:30
This question has made me want to be on this stack much more often. – Qix Mar 7 at 23:51
Just write anything. Clearly the door opens no matter what the input. – imallett Mar 8 at 3:28

twaalf, the Dutch word for the number twelve

The languages

go from West to East: Iceland $\rightarrow$ Portugal $\rightarrow$ Ireland $\rightarrow$ Spain $\rightarrow$ UK $\rightarrow$ France $\rightarrow$ Belgium.
Hence the next language should be Dutch.

The numerical values

follow the 4-bit Gray code (see https://en.wikipedia.org/wiki/Gray_code): 0000=0, 0001=1, 0011=3, 0010=2, 0110=6, 0111=7, 0101=5, 0100=4, 1100=12, 1101=13, 1111=15, 1110=14, 1010=10, 1011=11, 1001=9, 1000=8.
Hence the next number should be 12.

-
Had the same conclusion, but I couldn't make it to fit with 'vier' because I thought that was exclusive to german :-) – Carl Löndahl Mar 7 at 18:12
@CarlLöndahl hahaha so did I! I had to check just to make sure. – question_asker Mar 7 at 18:13
On the right track, but not quite – David Starkey Mar 7 at 18:15
@DavidStarkey OK, updated – question_asker Mar 7 at 18:19
Incredible. This site really does answer puzzles surprisingly quickly. – David Starkey Mar 7 at 18:20

To provide step one (mostly) but to add a guess:

The inputs are numbers, following this pattern:

$$\begin{array}{l | c} \text{Language} & \text{Number} \\ \hline \text{Icelandic} & 1 \\ \text{Portuguese} & 3 \\ \text{Irish} & 2 \\ \text{Spanish} & 6 \\ \text{English} & 7 \\ \text{French} & 5 \\ \text{German} & 4 \\ \end{array}$$