Good Messages

Source: pexels.com

Boris works at a secret communication station for the government training new employees on how to encode messages. Messages at this station are encoded with a rotation (“Caesar”) cipher that replaces each letter with one at a set offset in the alphabet, e.g., for offset $2$ an ‘a’ is replaced by a ‘c’ and ‘y’ is replaced by ‘a’. In order to encode a message, this cipher may be applied more than once. Each such application counts as a step in the encoding process. Boris teaches the new employees to encode messages by demonstrating each step of the encoding individually. However, Boris does not does not like seeing messages that contain at least half as many vowels as consonants after applying an encoding step. (Boris considers ‘a’, ‘e’, ‘i’, ‘o’, ‘u’, and ‘y’ as vowels.) He grows annoyed and more and more unhappy with each step where this situation occurs.

Your job is to encode a given message and determine whether Boris will see fewer steps that annoy him than ones that don’t. Since Boris wants to be happy in his job he will give a message that annoys him too much to a colleague.


The first line of the input contains a single integer $O$ ($1 \le O \le 25$) that represent the offset used for the rotation cipher. The second line contains the message to encode, which consists entirely of lowercase English characters. The length of the message is between $1$ and $80$ characters. The third line contains an integer $N$ ($1 \le N \le 26$), the number of times the cipher must be applied.


Output ‘Boris’ if strictly more steps sound good than bad, and ‘Colleague’ otherwise.

Sample Input 1 Sample Output 1
Sample Input 2 Sample Output 2
CPU Time limit 1 second
Memory limit 1024 MB
Difficulty 3.6medium
Statistics Show
License Creative Commons License (cc by-sa)

Please log in to submit a solution to this problem

Log in