q.forEach { it?.apply { queue[j++] = this } }