public long kthPrimeNumber(int k) {
        // write your code here
        PriorityQueue<Long> queue = new PriorityQueue<Long>();
        HashSet<Long> visited = new HashSet<Long>();
        int count = 0;
        long val = 0;
        while (count < k) {
            val = queue.poll();
            count += 1;
            long[] nums = new long[3];
            nums[0] = val * 3;
            nums[1] = val * 5;
            nums[2] = val * 7;
            for (long i : nums) {
                if (!visited.contains(i)) {
                    visited.add(i);
                    queue.offer(i);
                }
            }
        }
        return val;
    }