{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv id\u003d\"problem-body\"\u003e \n\u003cbr\u003e\n \u003cp\u003e Vinay is cleaning up his store for Diwali. Hence, he is clearing out his stock for the season. He checks upon his inventory and notes down the items that he finds. But as his store is really large, he finds it cumbersome to account for every item that he comes across. Thus, he asks you to note down all the items in lexicographical order (dictionary order), along with the number of each item.\n\u003cbr\u003e\n \u003c/p\u003e \n\u003ch3\u003eConstraints\u003c/h3\u003e\n\u003cp\u003e 1 \u0026lt;\u003d N \u0026lt;\u003d 500 \u003cbr\u003e\n String consists of only lowercase English alphabets. \u003cbr\u003e\n Length of each string \u0026lt;\u003d 100 \u003cbr\u003e\n\u003c/p\u003e\n\n \u003ch3\u003eInput\u003c/h3\u003e \n \u003cp\u003e\u003ci\u003e\u003c/i\u003e \n•\tThe first line of input contains the number of strings N.\n. \u003cbr\u003e \n•\tThen N strings follow.\n.\u003cbr\u003e\n \u003c/p\u003e \n \u003ch3\u003eOutput\u003c/h3\u003e \n \u003cp\u003eOutput the strings in lexicographical order and their frequency in the input.\u003cbr\u003e \u003c/p\u003e \n \u003ch3\u003eExample\u003c/h3\u003e \n \u003cp\u003e \u003cb\u003eInput:\u003c/b\u003e \u003c/p\u003e \n \u003cpre\u003e\n8\ntable\nchair\nspoon\nbag\npen\ntable\nspoon\ntable\n\u003c/pre\u003e \n \u003cp\u003e \u003cb\u003eOutput:\u003c/b\u003e \u003c/p\u003e \n \u003cpre\u003e\nbag 1\nchair 1\npen 1\nspoon 2\ntable 3\n\n\u003c/pre\u003e \n \n \u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e\n"}}]}