题目名称 758. [CodoJam2012] 奇怪的语言
输入输出 2012a.in/out
难度等级
时间限制 1000 ms (1 s)
内存限制 128 MiB
测试数据 1
题目来源 Gravatar王者自由 于2012-04-15加入
开放分组 全部用户
提交状态
分类标签
字符串
分享题解
通过:61, 提交:102, 通过率:59.8%
GravatarHakurou! 100 0.000 s 0.00 MiB C++
GravatarViolet Evergarde 100 0.000 s 0.00 MiB C++
Gravatar1020 100 0.000 s 0.00 MiB C++
Gravatar䱖虁職 100 0.000 s 0.00 MiB C++
Gravatar 100 0.000 s 0.00 MiB C++
Gravatar三木公 100 0.000 s 0.17 MiB Pascal
Gravatar三木公 100 0.000 s 0.17 MiB Pascal
Gravatar三木公 100 0.000 s 0.17 MiB Pascal
Gravatar三木公 100 0.000 s 0.17 MiB Pascal
Gravatar三木公 100 0.000 s 0.17 MiB Pascal
本题关联比赛
2012 资格赛
关于 奇怪的语言 的近10条评论(全部评论)
冒号写错地方了。。。我选择死亡。。。
GravatarZwoi_John Price
2016-11-18 11:42 9楼
VIP 好奇怪的一道题...Google翻译大法好!
Gravatar沉迷学习的假的Keller
2016-03-14 16:17 8楼
回复 @!@ :
给你一串串英文,但每个字母对应的不是原字母,而是其他字母,让你求转换后的,
转换规则其实自己找,在样例里
Gravatar水中音
2014-09-13 17:33 7楼
谁看得懂题目
Gravatar!@#¥%
2014-07-26 13:32 6楼
这题所有的数据都有相同的映射,所以从样例就可以看出答案
Gravatar赵寒烨
2013-08-26 21:57 5楼
这题所有的数据都有相同的映射,所以从样例就可以看出答案
Gravatar赵寒烨
2013-08-26 21:57 4楼
这题所有的数据都有相同的映射,所以从样例就可以看出答案
Gravatar赵寒烨
2013-08-26 21:57 3楼
奇奇怪怪的一道题……
Gravatarcstdio
2013-05-08 19:17 2楼
用的浏览器的Ctrl+F搞定……
GravatarTruth.Cirno
2012-07-16 16:56 1楼

758. [CodoJam2012] 奇怪的语言

☆   输入文件:2012a.in   输出文件:2012a.out   简单对比
时间限制:1 s   内存限制:128 MiB

Problem

We have come up with the best possible language here at Google, called Googlerese. To translate text into Googlerese, we take any message and replace each English letter with another English letter. This mapping isone-to-oneandonto, which means that the same input letter always gets replaced with the same output letter, and different input letters always get replaced with different output letters. A letter may be replaced by itself. Spaces are left as-is.

For example (and here is a hint!), our awesome translation algorithm includes the following three mappings: 'a' -> 'y', 'o' -> 'e', and 'z' -> 'q'. This means that "a zoo" will become "y qee".

Googlerese is based on the best possible replacement mapping, and we will never change it. It will always be the same. In every test case. We will not tell you the rest of our mapping because that would make the problem too easy, but there are a few examples below that may help.

Given some text in Googlerese, can you translate it to back to normal text?

Solving this problem

Usually, Google Code Jam problems have 1 Small input and 1 Large input. This problem has only1 Small input. Once you have solved the Small input, you have finished solving this problem.

Input

The first line of the input gives the number of test cases,T.Ttest cases follow, one per line.

Each line consists of a stringGin Googlerese, made up of one or more words containing the letters 'a' - 'z'. There will be exactly one space (' ') character between consecutive words and no spaces at the beginning or at the end of any line.

Output

For each test case, output one line containing "Case #X:S" whereXis the case number andSis the string that becomesGin Googlerese.

Limits

1 ≤T≤ 30.
Gcontains at most 100 characters.
None of the text is guaranteed to be valid English.

Sample

Input
3
ejp mysljylc kd kxveddknmc re jsicpdrysi
rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd
de kr kd eoya kw aej tysr re ujdr lkgc jv



Output
Case #1: our language is impossible to understand
Case #2: there are twenty six factorial possibilities
Case #3: so it is okay if you want to just give up