public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		StringBuilder out = new StringBuilder();
		fillDP();
		d: do {
			line = br.readLine();
			if (line == null || line.length() == 0)
				break d;
			int n = Integer.parseInt(line);
			out.append("TERM " + n + " IS " + ((char) dp[n])).append("\n");
		} while (line != null && line.length() != 0);
		System.out.print(out);
	}