Toc-Bum X54399


Statement
 

pdf   zip

html

Input

The input will contain three lines with three different positive numbers greater or equal than 3. The first number will be the TOC, the second number will be the BUM and the third one the target number.

Output

Print out the TOC-BUM sequence to represent the number or if it is not possible just output the target number.

Public test cases
  • Input

    5
    7
    9
    

    Output

    9
    
  • Input

    5
    7
    19
    

    Output

    TOC
    BUM
    BUM
  • Input

    3
    4
    6
    

    Output

    TOC
    TOC
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    C++ Python