题目描述
Background
Correction: In fact, since the release of MacOS X in 2001, the newline character has been $\n$. Many online articles contain errors, and the problem author believed them without实地考察. To prevent the spread of misinformation, this statement is included here. The data remains consistent with the current problem description and has not been altered.
Hecatia Lapislazuli is a deity with three bodies, presiding over the lunar, terrestrial, and otherworldly hells. Due to her alliance with Junon, Hecatia has come into contact with Gensokyo and other modern technologies.
Hecatia has noticed that in human society, there are three widely used operating systems: Windows, Linux, and Mac. These three systems, much like her own three bodies, each occupy a significant market share.
However, Hecatia has also observed that although files between these systems can be exchanged through certain methods, there are differences, such as the characters used for line breaks. She is very interested in this.
Now, Hecatia has obtained a text file from an unknown source and wants to know which system it was edited in. Can you write a program to help her?
Problem Description
In Windows, Linux, and Mac systems, three different newline characters are used. Represented as explicit escape characters, they are $\r\n$, $\n$, and $\r$ respectively. A non-empty text file (consisting only of uppercase and lowercase English letters, underscores, Arabic numerals, spaces, and newline characters) has been written in a single system, ensuring that only one of the above three newline characters is used.
For example, this is a valid text file:
SCP2021 J rp plus plus
chen zhe AK IOI
Welcome to Hell
When the newlines are replaced with their corresponding escape characters, it will appear as follows in the three systems:
- Windows system:
$$\colorbox{f5f5f5}{\verb!SCP2021 J rp plus plus\r\nchen zhe AK IOI\r\n\r\nWelcome to Hell!}$$
- Linux system:
$$\colorbox{f5f5f5}{\verb!SCP2021 J rp plus plus\nchen zhe AK IOI\n\nWelcome to Hell!\kern{31.5pt}}$$
- Mac system:
$$\colorbox{f5f5f5}{\verb!SCP2021 J rp plus plus\rchen zhe AK IOI\r\rWelcome to Hell!\kern{31.5pt}}$$
Your task is to determine, based on the converted text file, which system it was written in. For the above three cases, output windows, linux, or mac respectively.
Input Format
The input consists of a single line, which is the converted text file. The text file is guaranteed to be non-empty and to have at least one newline character before conversion. The input may contain spaces.
Output Format
Output a single lowercase word indicating which system the text file was written in.
Sample Input and Output
Sample Input #1
SCP2021RPplusplus\nchenzheAKIOI\n1plus1equalto2\n
Sample Output #1
linux
Sample Input #2
chen_zhe AK IOI\r\nchen_zhe AK NOI\r\n
Sample Output #2
windows
Sample Input #3
include iostream\rsigned main return 0\r
Sample Output #3
mac
Notes
Sample 4 can be found in the attached files system4.in/system4.out.
Data Range
- For 40% of the data, spaces are guaranteed not to exist.
- For 100% of the data, the length of the input string is guaranteed to be $\le 10^5$. The input only contains uppercase English letters, lowercase English letters, underscores, digits, spaces, and escape characters (
\r,\n).
Attention
In this problem, $\n$ and $\r$ represent a backslash followed by a lowercase letter n or r written directly in the input, not a real escape character.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分