编程介的小学生 2017-04-19 16:32 采纳率: 20.5%
浏览 929
已采纳

As A Wlohe

Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.

Or rather...

According to a researcher at Cambridge University, it doesn't matter in what order the letters in a word are, the only important thing is that the first and last letter be at the right place. The rest can be a total mess and you can still read it without problem. This is because the human mind does not read every letter by itself but the word as a whole.

Input

The input file first gives the dictionary of the words with length less than 20, ended by a line containing "DICTIONARY_DEFINE_OVER". Then, zero or more lines follow that line, each with a sentence. The sentences contain the messed up words that consist of only lowercase characters. There are punctuations that will only appear at the two ends of some words. NOTE, there will be exactly one original word in the dictionary for each word in the sentences. The size of dictionay is not larger than 10000 and there will be at most 1000 sentences each contains at most 80 characters.

Output

Output the original sentence for each line of sentence in a line.

Sample Input

all luck good fun have
watashi with is it
really totally amazing
prada
this fact
these words are not used
agree
DICTIONARY_DEFINE_OVER
wtaahsi:"raelly? tihs fcat is amzanig~~"
pdara:"ttaloly aegre wtih it."
hvae fun all, good lcuk~~

Sample Output

watashi:"really? this fact is amazing~~"
prada:"totally agree with it."
have fun all, good luck~~

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-05-05 03:35
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么