Vasya studies music.
He has learned lots of interesting stuff. For example, he knows that there are 12 notes: _C_, _C#_, _D_, _D#_, _E_, _F_, _F#_, _G_, _G#_, _A_, _B_, _H_. He also knows that the notes are repeated cyclically: after _H_ goes _C_ again, and before _C_ stands _H_. We will consider the _C_ note in the row's beginning and the _C_ note after the _H_ similar and we will identify them with each other. The distance between the notes along the musical scale is measured in tones: between two consecutive notes there's exactly one semitone, that is, 0.5 tone. The distance is taken from the lowest tone to the uppest one, that is, the distance between _C_ and _E_ is 4 semitones and between _E_ and _C_ is 8 semitones
Vasya also knows what a chord is. A chord is an unordered set of no less than three notes. However, for now Vasya only works with triads, that is with the chords that consist of exactly three notes. He can already distinguish between two types of triads — major and minor.
Let's define a major triad. Let the triad consist of notes _X_, _Y_ and _Z_. If we can order the notes so as the distance along the musical scale between _X_ and _Y_ equals 4 semitones and the distance between _Y_ and _Z_ is 3 semitones, then the triad is major. The distance between _X_ and _Z_, accordingly, equals 7 semitones.
A minor triad is different in that the distance between _X_ and _Y_ should be 3 semitones and between _Y_ and _Z_ — 4 semitones.
For example, the triad "_C E G_" is major: between _C_ and _E_ are 4 semitones, and between _E_ and _G_ are 3 semitones. And the triplet "_C# B F_" is minor, because if we order the notes as "_B C# F_", than between _B_ and _C#_ will be 3 semitones, and between _C#_ and _F_ — 4 semitones.
Help Vasya classify the triad the teacher has given to him.
## Input
The only line contains 3 space-separated notes in the above-given notation.
## Output
Print "_major_" if the chord is major, "_minor_" if it is minor, and "_strange_" if the teacher gave Vasya some weird chord which is neither major nor minor. Vasya promises you that the answer will always be unambiguous. That is, there are no chords that are both major and minor simultaneously.
[samples]
Let the 12 musical notes be represented as elements of $\mathbb{Z}_{12}$, where:
$$
\begin{aligned}
&\text{C} \mapsto 0, \quad \text{C\#} \mapsto 1, \quad \text{D} \mapsto 2, \quad \text{D\#} \mapsto 3, \quad \text{E} \mapsto 4, \quad \text{F} \mapsto 5, \\
&\text{F\#} \mapsto 6, \quad \text{G} \mapsto 7, \quad \text{G\#} \mapsto 8, \quad \text{A} \mapsto 9, \quad \text{B} \mapsto 10, \quad \text{H} \mapsto 11.
\end{aligned}
$$
Given three notes $a, b, c \in \mathbb{Z}_{12}$, define the set $S = \{a, b, c\}$.
Let $x_0 < x_1 < x_2$ be the sorted representatives of $S$ in the cyclic order modulo 12, considering the circular nature: the distances are computed as the minimal clockwise steps.
Define the three pairwise clockwise distances between consecutive notes (in sorted cyclic order):
$$
d_1 = (x_1 - x_0) \mod 12, \quad d_2 = (x_2 - x_1) \mod 12, \quad d_3 = (x_0 + 12 - x_2) \mod 12.
$$
Since the chord is a triad, exactly one of the three cyclic orderings yields a valid sequence of two adjacent intervals summing to 7 semitones (the third interval being 5 semitones, completing the circle). But for triads, we only consider the two intervals forming the stack (i.e., skip the wrap-around).
Actually, since the chord is unordered and we are to find *any* permutation of the three notes such that the two consecutive intervals are (4,3) for major or (3,4) for minor, we can do the following:
Let $T = \{a, b, c\}$. For each of the 6 permutations $(p_1, p_2, p_3)$ of $T$, compute:
$$
d_1 = (p_2 - p_1) \mod 12, \quad d_2 = (p_3 - p_2) \mod 12.
$$
If $d_1 = 4$ and $d_2 = 3$, then it is a **major** triad.
If $d_1 = 3$ and $d_2 = 4$, then it is a **minor** triad.
If no permutation satisfies either, output **strange**.
Note: The third interval $d_3 = (p_1 - p_3) \mod 12$ is always $12 - d_1 - d_2$, and we do not need to check it.
**Formal Statement:**
Let $S \subset \mathbb{Z}_{12}$ with $|S| = 3$.
Let $\mathcal{P}$ be the set of all ordered triples $(x, y, z)$ formed by permuting the elements of $S$.
Define:
$$
\text{major} \iff \exists (x, y, z) \in \mathcal{P} \text{ such that } (y - x) \mod 12 = 4 \text{ and } (z - y) \mod 12 = 3 \\
\text{minor} \iff \exists (x, y, z) \in \mathcal{P} \text{ such that } (y - x) \mod 12 = 3 \text{ and } (z - y) \mod 12 = 4
$$
Output:
- "major" if major condition holds,
- "minor" if minor condition holds,
- "strange" otherwise.