{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eThe \u003cdfn\u003eD-pairs\u003c/dfn\u003e of a string of letters are the ordered pairs of letters that are distance D from each other. A string is \u003cdfn\u003eD-unique\u003c/dfn\u003e if all of its D-pairs are different. A string is \u003cdfn\u003esurprising\u003c/dfn\u003e if it is D-unique for every possible distance D.\u003c/p\u003e\u003cp\u003eConsider the string ZGBG. Its 0-pairs are ZG, GB, and BG. Since these three pairs are all different, ZGBG is 0-unique. Similarly, the 1-pairs of ZGBG are ZB and GG, and since these two pairs are different, ZGBG is 1-unique. Finally, the only 2-pair of ZGBG is ZG, so ZGBG is 2-unique. Thus ZGBG is surprising. (Note that the fact that ZG is both a 0-pair and a 2-pair of ZGBG is irrelevant, because 0 and 2 are different distances.)\u003c/p\u003e\u003cp\u003e\u003cb\u003eAcknowledgement:\u003c/b\u003e This problem is inspired by the \"Puzzling Adventures\" column in the December 2003 issue of \u003ci\u003eScientific American\u003c/i\u003e.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe input consists of one or more nonempty strings of at most 79 uppercase letters, each string on a line by itself, followed by a line containing only an asterisk that signals the end of the input.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each string of letters, output whether or not it is surprising using the exact output format shown below.\u003c/p\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003eZGBG\r\nX\r\nEE\r\nAAB\r\nAABA\r\nAABB\r\nBCBABCC\r\n*\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eZGBG is surprising.\r\nX is surprising.\r\nEE is surprising.\r\nAAB is surprising.\r\nAABA is surprising.\r\nAABB is NOT surprising.\r\nBCBABCC is NOT surprising.\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}