Lefty the Neanderthal is in the process of discovering counting for the first time in history. Using the fingers of his right hand, Lefty assigns each of them a name. he names the first finger "ook", the second finger "ook ook", the third "ooh", the fourth "ooga" and the fifth "ug". For many says this is enough, allowing Lefty to quickly express a count to his collegues in words that are more precise than "many" and "lots".
One day lefty was stuck... after he counted ug shiny beads he realized he had more! So he took a look at his right foot and started naming his toes! He called his toes "mook", "mook mook", "oogam", "oogum" and "ug ug". Now lefty can count all kinds of things!
|Number||Neanderthal Number Word|
|0||No such concept|
The input will contain test cases. Each test case consists of a single line of text with Neanderthal number words. The words are not separated by spaces. You must parse each line and print out (on a single line) the number of possible sequences of Neanderthal numbers that can be represented by a Neanderthal person speaking the words aloud (for example the string "oogamookoogumook" could be "ooga mook oogum ook" meaning "4 6 9 1" or "oogam ook oogum ook" meaning "8 1 9 1".
Note that the sample input below only contains test cases, but the real data files will contain .
Educational Computing Organization of Ontario - statements, test data and other materials can be found at ecoocs.org