KAMIL - Kamil

Some kids cannot pronounce all letters, some of them they sometimes pronounce correctly and sometimes incorrectly. Kamil sometimes says T instead of K, but he never says K instead of T. Similarly he sometimes says D instead of G. Instead of R he sometimes says L and sometimes F. Of course it happens that he pronounces the letter correctly. Kamil's father always thinks how many words can mean the word spoken by his son (it doesn't matter if they are real English words).

Task

Write a program which

  • reads from standard input the words spoken by Kamil
  • counts how many different words can that mean
  • writes the outcome on standard output

 

Input

Ten test cases (given one under another, you have to process all!). Every test case is a single line - a word spoken by Kamil. Only 26 capital leters are used. The length of the word is at most 20.

Output

For every testcase write an integer in a single line with a single integer, denoting the number of words which Kamil's word can mean.

Score

The score awarded to your program is the number of bytes the source code you submit. The fewer points you score, the better. Submissions are not allowed to exceed 256 bytes.

Remark. It may turn out impossible to solve this problem in some languages.

Example

Input:
FILIPEK
[and 9 test cases more]

Output:
4
[and 9 test cases more]


Added by:Adam Dzedzej
Date:2004-06-08
Time limit:3s
Source limit:256B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NODEJS OBJC PERL6 SQLITE VB.NET
Resource:Internet Contest Pogromcy Algorytmow (Algorithm Tamers) Round I, 2003

hide comments
2013-05-23 03:22:04 Ouditchya Sinha
How is a '0' score possible???
The solver James Woodpecker didn't get the 3 points for best solution & my points were reduced. Weird...

Last edit: 2013-05-23 03:25:04
2012-08-24 13:20:12 Mostafa 36a2
Is Thats right :
TDLF______16
MOSTAFA____4
WHAT_______2


Last edit: 2012-08-24 14:38:44
2012-04-29 15:53:06 Venkatesh Ganesan


Last edit: 2012-04-29 15:56:05
2012-04-09 11:17:07 eXerigumo Clanjor
I've made it into 22B, wondering if I can make it into 20B.

Last edit: 2012-04-09 12:00:03
2011-12-24 22:05:14 Piotr KÄ…kol
24 is no longer the shortest possible code. The record is 21 chars in AWK by Sebastian Jakubiak.
2011-10-29 20:18:30 Kumar Harsh
It is quite possible & very simple with CPP... the only thing is the code size was ~160B
2011-10-08 00:43:15 Shadi Saleh
Yes , I solved it with C++
2011-06-21 20:07:44 Mateusz Drewienkowski
'D' is an easy letter to say. 'G' on the other hand is quite hard. If Kamil manages to say 'G', you can be sure he means it.
2011-05-26 18:50:39 Hermano
So I can Assume if he said d he could have said g, and vice-versa?

Or if he said g, he really meant to say g?
2011-05-09 11:00:16 rauh
it is possible with c++
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.