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-08-10 07:26:55 ----------------------
#include<stdio.h>
2013-08-01 16:25:53 Mostafa 36a2
@ওয়াসী (Wasi) Congratulations ! :)
2013-08-01 15:12:20 ওয়াসী (Wasi)
stuck at 22B :(
EDIT: At last 21B :D
My first best solution in challenge

Last edit: 2013-08-01 15:54:31
2013-07-24 08:38:29 Mostafa 36a2
OH MY GOD !
finally done it 21 char in awk !
my first Best challenge :D
2013-07-23 08:49:55 shashank
First program in python!!
WOOOPPPPPPPPPPPPPPPPPPPPPP..
2013-07-16 19:05:10 Vaibhav Yenamandra
Damn! its so hard to get Perl to go under 28 in this!!
2013-07-01 07:58:09 rfczzz
101b in C# - How is it possible??
2013-06-29 05:48:27 (Tjandra Satria Gunawan)(曾毅昆)
Yeah! 168B in BF language! ;-)
2013-05-23 05:44:50 VV
This bug seems to be present in couple of more problems! DDATE and SIZECON are some I am aware as of now.
2013-05-23 04:08:31 Mitch Schwartz
There's some bug, and it's been reported to SPOJ admins. Top score of 0 always makes it so nobody gets any points, but those solutions will be rejudged or disqualified once the bug has been fixed so things can return to normal. Thanks for your patience.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.