Shakespeare 3


Submit solution

Points: 2
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
C++, Python3

In this task, you will need to generate some code.

Shakespeare's English spelling is noticeably different from your standard English from 2021. We've provided you with a list of words alongside their contemporary version here.

Your job is simple: given an input sentence in Shakespeare's English, replace the words that are spelled differently from our English with the correct word from dict.txt, and output it.

Hint: use python's file to write a script that transforms dict.txt into dict.py, and use that to write your code.

Input Specification

The first line will contain a single integer \(N\) (\(1 < N < 100\)), which is the number of test cases.

The next \(N\) lines will each contain a lowercase sentence from Hamlet.

Output Specification

\(N\) lines: the modernised version.

Sample Input 1

5
my father , me thinkes i see my father
hor . as thou art to thy selfe ,
ham . i am glad of it : a knauish speech sleepes in a
you told vs of some suite . what is ' t laertes ?
i haue beene in continuall practice ; i shall winne at the

Sample Output 1

my father , me methinks i see my father
hor . as thou' art to thy self ,
ham . i am glad of it : a knavish speech sleeps in a
your told vs of some suit . what is ' t laertes ?
i have been in continual practice ; i shall win at th

Comments

There are no comments at the moment.