View as PDF

Points: 5 (partial)
Time limit: 2.0s
Memory limit: 16M

Authors:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Bruno is widely known to be extremely organized, and it follows suit that he even likes to organize tiny beads. Bruno has beads aligned on his desk side by side, each of which is coloured red, yellow, or blue. Red beads are represented by the character R, yellow by Y, and blue by B. It is guaranteed that there are all 3 types of beads present. A sequence of beads is considered to be organized if all beads of the same colour are grouped in a single contiguous sequence. For example, the sequence BBBRRRYYR is unorganized, since the rightmost red bead is not grouped together with the rest of the red beads. Bruno, being too preoccupied with homework, asks you to write him a program to determine if his sequence of beads is organized.

#### Input Specification

The first line contains one integer, . ()

The second line contains a single string of length , representing the initial state of the beads.

#### Output Specification

Output one string, Organized if the sequence is organized, otherwise FIX YOUR BEADS!.

#### Sample Input

9
BBBRRRYYR

#### Sample Output

FIX YOUR BEADS!