Pro.ID22757 TitleOld Fathioned Typetetting Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22757 AC0 Submit0 Ratio- 时间&空间限制描述In Olden Days, before digital typesetting (before Babbage, even), typesetting was an art, practiced by highly skilled craftsmen. Certain character combinations, such as a-e or f-i were typeset as a single character, called a ligature, to save space and to make the characters look better together on the printed page (the ligatures for a-e and f-i were 'æ' and 'fi', respectively; the table on the next page, lists all possible ligature combinations). In addition, there were two different versions of the lowercase letter s: the "long s" and the "short s". Only the short s is used today. The rules for when to use which version are odd, but straightforward:
Note that a "word" is not the same thing as an "identifier." While identifiers can contain punctuation marks such as '_' or ' , words can contain only letters (at least as far as typographers are concerned). Therefore, identifiers like "radius3" and "adios_amigo" would be typeset as "radius3" and "adios_amigo", respectively, rather than "radiuſ3" and "adioſ_amigo". 输入The first line of input contains a single integer P, (1 ≤ P ≤ 1000), which is the number of data sets that follow. Each data set consists of a single line containing the data set number, followed by a space, followed by a string of no more than 1000 characters. 输出Description In Olden Days, before digital typesetting (before Babbage, even), typesetting was an art, practiced by highly skilled craftsmen. Certain character combinations, such as a-e or f-i were typeset as a single character, called a ligature, to save space and to make the characters look better together on the printed page (the ligatures for a-e and f-i were 'æ' and 'fi', respectively; the table on the next page, lists all possible ligature combinations). In addition, there were two different versions of the lowercase letter s: the "long s" and the "short s". Only the short s is used today. The rules for when to use which version are odd, but straightforward:
Note that a "word" is not the same thing as an "identifier." While identifiers can contain punctuation marks such as '_' or ' |