// Arup Guha
// 1/18/2014
// Solution to 2006 MCPC Problem C: Surprising Strings.

import java.util.*;

public class c {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		String s = stdin.nextLine();

		// Go through each string.
		while (!s.equals("*")) {

			// Assume surpring until there's proof otherwise.
			boolean surprise = true;
			for (int i=0; i<s.length()-1; i++) {

				// Trying "gap" of i here. Mark each pair used.
				boolean[] used = new boolean[26*26];
				for (int j=0; j+i+1<s.length(); j++) {
					int code = 26*(s.charAt(j) - 'A') + (s.charAt(j+i+1)-'A');
					if (used[code]) {
						surprise = false;
						break;
					}
					used[code] = true;
				}

				// No point in continuing.
				if (!surprise) break;
			}

			// Print result and read next case.
			if (surprise)
				System.out.println(s+" is surprising.");
			else
				System.out.println(s+" is NOT surprising.");

			s = stdin.nextLine();
		}
	}
}