public static boolean run(int num) {
		char[] n = (num + "").toCharArray();
		int mask = 0, used = 0, pos = 0;
		for (int i = 0; i < n.length; i++) {
			if (n[i] == '0' || (mask & (1 << (n[i] - '0'))) != 0)
				return false;
			mask |= (1 << (n[i] - '0'));
		}
		mask = 0;
		do {
			if ((mask & (1 << pos)) != 0)
				return false;
			mask |= (1 << pos);
			pos = (pos + n[pos] - '0') % n.length;
			used++;
		} while (pos != 0);
		return used == n.length;
	}