{"trustable":false,"sections":[{"title":"","value":{"format":"PLAIN","content":"Don\u0027t get afraid for long description. Read carefully."}},{"title":"Description","value":{"format":"PLAIN","content":"TEX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a beautiful document. Beautiful documents use “ and ” to delimit quotations, rather than the mundane \" which is what is provided by most keyboards. Keyboards typically do not have an oriented double-quote, but they do have a left-single-quote ` and a right-single-quote \u0027. Check your keyboard now to locate the left-single-quote key ` (sometimes called the “backquote key”) and the right-single-quote key \u0027 (sometimes called the “apostrophe” or just “quote”). Be careful not to confuse the left-single-quote ` with the “backslash” key \\. TEX lets the user type two left-single-quotes `` to create a left-double-quote “ and two right-single-quotes \u0027\u0027 to create a right-double-quote ”. Most typists, however, are accustomed to delimiting their quotations with the un-oriented double-quote \". If the source contained \"To be or not to be,\" quoth the bard, \"that is the question.\" then the typeset document produced by TEX would not contain the desired form: “To be or not to be,” quoth the bard, “that is the question.”\n\n\nIn order to produce the desired form, the source file must contain the sequence:\n``To be or not to be,\u0027\u0027 quoth the bard, ``that is the question.\u0027\u0027\n\n\nYou are to write a program which converts text containing double-quote (\") characters into text\nthat is identical except that double-quotes have been replaced by the two-character sequences required by TEX for delimiting quotations with oriented double-quotes. The double-quote (\") characters should be replaced appropriately by either `` if the \" opens a quotation and by \u0027\u0027 if the \" closes a quotation. Notice that the question of nested quotations does not arise: The first \" must be replaced by ``, the next by \u0027\u0027, the next by ``, the next by \u0027\u0027, the next by ``, the next by \u0027\u0027, and so on.\n"}},{"title":"Input","value":{"format":"PLAIN","content":"Input will consist of several lines of text containing an even number of double-quote (\") characters.\nInput is ended with an end-of-file character."}},{"title":"Output","value":{"format":"PLAIN","content":"The text must be output exactly as it was input except that:\n• the first \" in each pair is replaced by two ` characters: `` and\n• the second \" in each pair is replaced by two \u0027 characters: \u0027\u0027.\n"}},{"title":"Sample Input","value":{"format":"PLAIN","content":"\"To be or not to be,\" quoth the Bard, \"that\nis the question\".\nThe programming contestant replied: \"I must disagree.\nTo `C\u0027 or not to `C\u0027, that is The Question!\"\n"}},{"title":"Sample Output","value":{"format":"PLAIN","content":"``To be or not to be,\u0027\u0027 quoth the Bard, ``that\nis the question\u0027\u0027.\nThe programming contestant replied: ``I must disagree.\nTo `C\u0027 or not to `C\u0027, that is The Question!\u0027\u0027"}}]}