P7869 "Wdoi-4" Using Three OS-Level Abilities.
Background
**Erratum**: In fact, since $\text{MacOS X}$ released in $2001$, the newline character has been $\verb!\n!$. Many articles published online contain mistakes; the problem setter also believed them without checking in person. To prevent rumors from spreading further, this paragraph is placed here. The testdata still follows the current problem statement and has not been changed.
---
Hecatia Lapislazuli is a goddess with three bodies, ruling the hells of the Moon, the Earth, and the Otherworld. Because she formed an alliance with Junko, Hecatia came into contact with Gensokyo, as well as some modern technology.
Hecatia found that in human society there are three very common and popular operating systems: $\text{Windows}$, $\text{Linux}$, and $\text{Mac}$. These three are like Hecatia’s three bodies, each taking a large share of the market.
But Hecatia also found that although files can be exchanged between these three systems in some ways, there are still differences—for example, the characters used for newlines. Hecatia is very interested in this.
Now Hecatia somehow got a text file from some system. She wants to know on which system this file was edited. Can you write a program to help her?
Description
On $\text{Windows}$, $\text{Linux}$, and $\text{Mac}$ systems, three different newline conventions are used. Written as explicit escape sequences, they are $\verb!\r\n!$, $\verb!\n!$, and $\verb!\r!$. Now there is a non-empty text file that has already been written (it contains only uppercase and lowercase English letters, underscores, Arabic digits, spaces, and newlines). This text file was written on a single system, so it is guaranteed that the newline sequences appear in **only one** of the three forms above.
For example, this is a valid text file:
```plain
SCP2021 J rp plus plus
chen zhe AK IOI
Welcome to Hell
```
Now replace its newlines with the corresponding escape sequences. Then, on the three systems, it would look like the following:
- $\text{Windows}$ system:
$$\colorbox{f5f5f5}{\verb!SCP2021 J rp plus plus\r\nchen zhe AK IOI\r\n\r\nWelcome to Hell!}$$
- $\text{Linux}$ system:
$$\colorbox{f5f5f5}{\verb!SCP2021 J rp plus plus\nchen zhe AK IOI\n\nWelcome to Hell!\kern{31.5pt}}$$
- $\text{Mac}$ system:
$$\colorbox{f5f5f5}{\verb!SCP2021 J rp plus plus\rchen zhe AK IOI\r\rWelcome to Hell!\kern{31.5pt}}$$
---
Your task is: given the converted text file, determine on which system this text file was written. For the three cases above, output `windows`, `linux`, or `mac`, respectively.
Input Format
There is one line of input: the converted text file. The text file is guaranteed to be non-empty, and before conversion it contains at least one newline. **The input may contain spaces.**
Output Format
Output one line with one lowercase word, indicating on which system this text file was written.
Explanation/Hint
Sample $4$ can be found in the attached files $\textbf{\textit{system4.in}/\textit{system4.out}}$.
#### Constraints
- For $40\%$ of the testdata, it is guaranteed that there are no spaces.
- For $100\%$ of the testdata, the input string length is guaranteed to be $\le 10^5$. The input contains only uppercase English letters, lowercase English letters, underscores, digits, spaces, and escape characters (`\r`, `\n`).
#### Note
In this problem, `\n` and `\r` mean a backslash character directly written in the input followed by a lowercase letter `n` or `r`, rather than a **real** escape character.
Translated by ChatGPT 5