编程介的小学生 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 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?