package main

import (
	"bufio"
	"bytes"
	"fmt"
	"os"
	"sort"
)

func main() {
	reader := bufio.NewReader(os.Stdin)

	var buf bytes.Buffer

	tc := readNum(reader)

	for tc > 0 {
		tc--
		n, m := readTwoNums(reader)
		X := make([]int, n)
		P := make([]int, n)
		for i := 0; i < n; i++ {
			X[i], P[i] = readTwoNums(reader)
		}
		res := solve(n, X, P, m)
		buf.WriteString(res)
		buf.WriteByte('\n')
	}

	fmt.Print(buf.String())
}

func readString(reader *bufio.Reader) string {
	s, _ := reader.ReadString('\n')
	for i := 0; i < len(s); i++ {
		if s[i] == '\n' || s[i] == '\r' {
			return s[:i]
		}
	}
	return s
}

func normalize(s string) string {

	for i := len(s); i > 0; i-- {
		if s[i-1] >= 'a' && s[i-1] <= 'z' {
			return s[:i]
		}
	}
	return ""
}

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

func solve(n int, X []int, P []int, m int) string {

	diff := make([]Pair, 0, 3*n)

	for i := 0; i < n; i++ {
		diff = append(diff, Pair{2 * int64(X[i]-P[i]), 1})
		diff = append(diff, Pair{2 * int64(X[i]), -2})
		diff = append(diff, Pair{2 * int64(X[i]+P[i]), 1})
	}

	sort.Slice(diff, func(i, j int) bool {
		return diff[i].first < diff[j].first || diff[i].first == diff[j].first && diff[i].second < diff[j].second
	})

	var a, d int64
	var last int64

	M := 2 * int64(m)

	key := Pair{0, -0x3f3f3f3f3f3f3f3f}

	for _, p := range diff {
		if p.first != last {
			a = a + (p.first-last)*d
			last = p.first
			if a > M {
				key = intercection(key, Pair{p.first, a - M})
			}
		}
		d += p.second
	}

	res := make([]byte, n)
	for i := 0; i < n; i++ {
		cur := Pair{2 * int64(X[i]), 2 * int64(P[i])}
		tmp := intercection(key, cur)
		if tmp == cur {
			res[i] = '1'
		} else {
			res[i] = '0'
		}
	}
	return string(res)
}

func intercection(a, b Pair) Pair {
	x := max(a.first+a.second, b.first+b.second)
	y := max(a.second-a.first, b.second-b.first)
	return Pair{(x - y) / 2, (x + y) / 2}
}

type Pair struct {
	first  int64
	second int64
}

func solve1(n int, X []int, P []int, m int) string {
	rs := make([]RainDay, n)

	for i := 0; i < n; i++ {
		rs[i] = RainDay{X[i], P[i], i}
	}

	sort.Slice(rs, func(i, j int) bool {
		return rs[i].pos < rs[j].pos
	})

	V := NewSegTree(n)
	arr := make([]int64, n)

	cnt := make([]int, n+1)

	for i := n - 1; i >= 0; i-- {
		cnt[i] += cnt[i+1]
		cur := rs[i]
		j := search(n, func(j int) bool {
			return rs[j].pos >= cur.pos-cur.vol
		})
		V.Update(j, i+1, int64(cur.vol-cur.pos))
		cnt[i]++
		if j > 0 {
			cnt[j-1]--
		}
		arr[i] += int64(cnt[i])*int64(cur.pos) + V.Get(i)
	}

	V.Reset()
	for i := 0; i <= n; i++ {
		cnt[i] = 0
	}

	for i := 0; i < n; i++ {
		if i > 0 {
			cnt[i] += cnt[i-1]
		}
		cur := rs[i]
		j := search(n, func(j int) bool {
			return rs[j].pos > cur.pos+cur.vol
		})
		// (i+1, v-1), (i + 2, v - 2), (i + 3, v - 3)... (j, 0)
		// k - i + v
		// 是在(i + 1, j) 之间 使用 v- i
		V.Update(i, j, int64(cur.vol+cur.pos))
		cnt[i]++
		cnt[j]--

		arr[i] += int64(cnt[i])*int64(-cur.pos) + V.Get(i)
	}

	for i := 0; i < n; i++ {
		arr[i] -= int64(rs[i].vol)
	}

	arr2 := make([]int64, 2*n)
	copy(arr2[n:], arr)

	for i := n - 1; i > 0; i-- {
		arr2[i] = max(arr2[i*2], arr2[i*2+1])
	}

	getMax := func(l, r int) int64 {
		l += n
		r += n
		var res int64

		for l < r {
			if l&1 == 1 {
				res = max(res, arr2[l])
				l++
			}
			if r&1 == 1 {
				r--
				res = max(res, arr2[r])
			}
			l >>= 1
			r >>= 1
		}
		return res
	}

	for i := 0; i < n; i++ {
		arr[i] += int64(rs[i].pos)
	}
	// 取消某个i， 相当于从  arr[a...b] 中减去 v - i

	root := BuildTree(arr)

	M := int64(m)

	buf := make([]byte, n)

	for i := 0; i < n; i++ {
		cur := rs[i]

		root.Add(i, i, -2*int64(cur.pos))

		v := cur.vol
		a := search(n, func(j int) bool {
			return rs[j].pos >= cur.pos-v
		})

		b := search(n, func(j int) bool {
			return rs[j].pos > cur.pos+v
		})
		// -(v - (i - j)) = -v + i - j
		root.Add(a, i, -int64(v)+int64(cur.pos))

		if i+1 <= b-1 {
			// -(v - (j - i)) = -(v - j + i) = -v + j - i
			root.Add(i+1, b-1, -int64(v)-int64(cur.pos))
		}

		tmp := root.Get(a, b-1)

		if a > 0 {
			tmp = max(tmp, getMax(0, a))
		}
		if b < n {
			tmp = max(tmp, getMax(b, n))
		}

		if tmp > M {
			buf[cur.id] = '0'
		} else {
			buf[cur.id] = '1'
		}
		// add back
		root.Add(a, i, int64(v)-int64(cur.pos))
		if i+1 <= b-1 {
			root.Add(i+1, b-1, int64(v)+int64(cur.pos))
		}
	}
	return string(buf)
}

type Node struct {
	left  *Node
	right *Node
	begin int
	end   int
	val   int64
	lazy  int64
}

func NewNode(begin, end int) *Node {
	node := new(Node)
	node.begin = begin
	node.end = end
	return node
}

func BuildTree(arr []int64) *Node {
	var build func(l int, r int) *Node

	build = func(l int, r int) *Node {
		node := NewNode(l, r)
		if l == r {
			node.val = arr[l]
			return node
		}
		mid := (l + r) / 2
		node.left = build(l, mid)
		node.right = build(mid+1, r)
		node.val = max(node.left.val, node.right.val)
		return node
	}

	return build(0, len(arr)-1)
}

func (node *Node) push() {
	if node.lazy != 0 {
		if node.left != nil {
			node.left.lazy += node.lazy
			node.left.val += node.lazy
			node.right.lazy += node.lazy
			node.right.val += node.lazy
		}
		node.lazy = 0
	}
}

func (node *Node) Add(l int, r int, v int64) {
	if node.end < l || r < node.begin {
		return
	}
	node.push()
	if l <= node.begin && node.end <= r {
		node.val += v
		node.lazy += v
		return
	}
	node.left.Add(l, r, v)
	node.right.Add(l, r, v)

	node.val = max(node.left.val, node.right.val)
}

func (node *Node) Get(l int, r int) int64 {
	if node.end < l || r < node.begin {
		return 0
	}

	node.push()

	if l <= node.begin && node.end <= r {
		return node.val
	}

	a := node.left.Get(l, r)
	b := node.right.Get(l, r)

	node.val = max(node.left.val, node.right.val)

	return max(a, b)
}

func max(a, b int64) int64 {
	if a >= b {
		return a
	}
	return b
}

type SegTree struct {
	arr []int64
	n   int
}

func NewSegTree(n int) *SegTree {
	arr := make([]int64, 2*n)
	return &SegTree{arr, n}
}

func (t *SegTree) Update(l, r int, v int64) {
	l += t.n
	r += t.n
	for l < r {
		if l&1 == 1 {
			t.arr[l] += v
			l++
		}
		if r&1 == 1 {
			r--
			t.arr[r] += v
		}
		l >>= 1
		r >>= 1
	}
}

func (t *SegTree) Get(p int) int64 {
	var res int64
	p += t.n

	for p > 0 {
		res += t.arr[p]
		p >>= 1
	}
	return res
}

func (t *SegTree) Reset() {
	for i := 0; i < len(t.arr); i++ {
		t.arr[i] = 0
	}
}

type RainDay struct {
	pos int
	vol int
	id  int
}

func search(n int, f func(int) bool) int {
	l, r := 0, n
	for l < r {
		mid := (l + r) / 2
		if f(mid) {
			r = mid
		} else {
			l = mid + 1
		}
	}
	return r
}

package main

import (
	"bufio"
	"bytes"
	"fmt"
	"os"
	"sort"
)

func main() {
	reader := bufio.NewReader(os.Stdin)

	var buf bytes.Buffer

	tc := readNum(reader)

	for tc > 0 {
		tc--
		n, m := readTwoNums(reader)
		X := make([]int, n)
		P := make([]int, n)
		for i := 0; i < n; i++ {
			X[i], P[i] = readTwoNums(reader)
		}
		res := solve(n, X, P, m)
		buf.WriteString(res)
		buf.WriteByte('\n')
	}

	fmt.Print(buf.String())
}

func readString(reader *bufio.Reader) string {
	s, _ := reader.ReadString('\n')
	for i := 0; i < len(s); i++ {
		if s[i] == '\n' || s[i] == '\r' {
			return s[:i]
		}
	}
	return s
}

func normalize(s string) string {

	for i := len(s); i > 0; i-- {
		if s[i-1] >= 'a' && s[i-1] <= 'z' {
			return s[:i]
		}
	}
	return ""
}

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

func solve(n int, X []int, P []int, m int) string {
	rs := make([]RainDay, n)

	for i := 0; i < n; i++ {
		rs[i] = RainDay{X[i], P[i], i}
	}

	sort.Slice(rs, func(i, j int) bool {
		return rs[i].pos < rs[j].pos
	})

	V := NewSegTree(n)
	arr := make([]int64, n)

	cnt := make([]int, n+1)

	for i := n - 1; i >= 0; i-- {
		cnt[i] += cnt[i+1]
		cur := rs[i]
		j := search(n, func(j int) bool {
			return rs[j].pos >= cur.pos-cur.vol
		})
		V.Update(j, i+1, int64(cur.vol-cur.pos))
		cnt[i]++
		if j > 0 {
			cnt[j-1]--
		}
		arr[i] += int64(cnt[i])*int64(cur.pos) + V.Get(i)
	}

	V.Reset()
	for i := 0; i <= n; i++ {
		cnt[i] = 0
	}

	for i := 0; i < n; i++ {
		if i > 0 {
			cnt[i] += cnt[i-1]
		}
		cur := rs[i]
		j := search(n, func(j int) bool {
			return rs[j].pos > cur.pos+cur.vol
		})
		// (i+1, v-1), (i + 2, v - 2), (i + 3, v - 3)... (j, 0)
		// k - i + v
		// 是在(i + 1, j) 之间 使用 v- i
		V.Update(i, j, int64(cur.vol+cur.pos))
		cnt[i]++
		cnt[j]--

		arr[i] += int64(cnt[i])*int64(-cur.pos) + V.Get(i)
	}

	for i := 0; i < n; i++ {
		arr[i] -= int64(rs[i].vol)
	}

	arr2 := make([]int64, 2*n)
	copy(arr2[n:], arr)

	for i := n - 1; i > 0; i-- {
		arr2[i] = max(arr2[i*2], arr2[i*2+1])
	}

	getMax := func(l, r int) int64 {
		l += n
		r += n
		var res int64

		for l < r {
			if l&1 == 1 {
				res = max(res, arr2[l])
				l++
			}
			if r&1 == 1 {
				r--
				res = max(res, arr2[r])
			}
			l >>= 1
			r >>= 1
		}
		return res
	}

	for i := 0; i < n; i++ {
		arr[i] += int64(rs[i].pos)
	}
	// 取消某个i， 相当于从  arr[a...b] 中减去 v - i

	root := BuildTree(arr)

	M := int64(m)

	buf := make([]byte, n)

	for i := 0; i < n; i++ {
		cur := rs[i]

		root.Add(i, i, -2*int64(cur.pos))

		v := cur.vol
		a := search(n, func(j int) bool {
			return rs[j].pos >= cur.pos-v
		})

		b := search(n, func(j int) bool {
			return rs[j].pos > cur.pos+v
		})
		// -(v - (i - j)) = -v + i - j
		root.Add(a, i, -int64(v)+int64(cur.pos))

		if i+1 <= b-1 {
			// -(v - (j - i)) = -(v - j + i) = -v + j - i
			root.Add(i+1, b-1, -int64(v)-int64(cur.pos))
		}

		tmp := root.Get(a, b-1)

		if a > 0 {
			tmp = max(tmp, getMax(0, a))
		}
		if b < n {
			tmp = max(tmp, getMax(b, n))
		}

		if tmp > M {
			buf[cur.id] = '0'
		} else {
			buf[cur.id] = '1'
		}
		// add back
		root.Add(a, i, int64(v)-int64(cur.pos))
		if i+1 <= b-1 {
			root.Add(i+1, b-1, int64(v)+int64(cur.pos))
		}
	}
	return string(buf)
}

type Node struct {
	left  *Node
	right *Node
	begin int
	end   int
	val   int64
	lazy  int64
}

func NewNode(begin, end int) *Node {
	node := new(Node)
	node.begin = begin
	node.end = end
	return node
}

func BuildTree(arr []int64) *Node {
	var build func(l int, r int) *Node

	build = func(l int, r int) *Node {
		node := NewNode(l, r)
		if l == r {
			node.val = arr[l]
			return node
		}
		mid := (l + r) / 2
		node.left = build(l, mid)
		node.right = build(mid+1, r)
		node.val = max(node.left.val, node.right.val)
		return node
	}

	return build(0, len(arr)-1)
}

func (node *Node) push() {
	if node.lazy != 0 {
		if node.left != nil {
			node.left.lazy += node.lazy
			node.left.val += node.lazy
			node.right.lazy += node.lazy
			node.right.val += node.lazy
		}
		node.lazy = 0
	}
}

func (node *Node) Add(l int, r int, v int64) {
	if node.end < l || r < node.begin {
		return
	}
	node.push()
	if l <= node.begin && node.end <= r {
		node.val += v
		node.lazy += v
		return
	}
	node.left.Add(l, r, v)
	node.right.Add(l, r, v)

	node.val = max(node.left.val, node.right.val)
}

func (node *Node) Get(l int, r int) int64 {
	if node.end < l || r < node.begin {
		return 0
	}

	node.push()

	if l <= node.begin && node.end <= r {
		return node.val
	}

	a := node.left.Get(l, r)
	b := node.right.Get(l, r)

	node.val = max(node.left.val, node.right.val)

	return max(a, b)
}

func max(a, b int64) int64 {
	if a >= b {
		return a
	}
	return b
}

type SegTree struct {
	arr []int64
	n   int
}

func NewSegTree(n int) *SegTree {
	arr := make([]int64, 2*n)
	return &SegTree{arr, n}
}

func (t *SegTree) Update(l, r int, v int64) {
	l += t.n
	r += t.n
	for l < r {
		if l&1 == 1 {
			t.arr[l] += v
			l++
		}
		if r&1 == 1 {
			r--
			t.arr[r] += v
		}
		l >>= 1
		r >>= 1
	}
}

func (t *SegTree) Get(p int) int64 {
	var res int64
	p += t.n

	for p > 0 {
		res += t.arr[p]
		p >>= 1
	}
	return res
}

func (t *SegTree) Reset() {
	for i := 0; i < len(t.arr); i++ {
		t.arr[i] = 0
	}
}

type RainDay struct {
	pos int
	vol int
	id  int
}

func search(n int, f func(int) bool) int {
	l, r := 0, n
	for l < r {
		mid := (l + r) / 2
		if f(mid) {
			r = mid
		} else {
			l = mid + 1
		}
	}
	return r
}


package main

import (
	"bufio"
	. "fmt"
	"io"
	//"math"
	"os"
)

func run(r io.Reader, w io.Writer) {
	in := bufio.NewReader(r)
	out := bufio.NewWriter(w)
	defer out.Flush()

	var t int
	for Fscan(in, &t); t > 0; t-- {
		var n int
		Fscan(in, &n)

		for i := 0; i < n; i++ {
			var num int
			Fscan(in, &num)
		}
		Fprintln(out, 3 * n)
		table := []int{1, 1, 2, 1, 1, 2}
		for i := 1; i <= n; i += 2 {
			for _, move := range table {
				Fprintln(out, move, i, i + 1)
			}
		}
	}
}

func main() { run(os.Stdin, os.Stdout) }

func min(a, b int) int {
	if a > b {
		return b
	}
	return a
}

func max(a, b int) int {
	if a > b {
		 return a
	}
	return b
}

func abs(num int) int {
	if num < 0 {
		return -num
	}
	return num
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	//"math"
	"os"
)

func run(r io.Reader, w io.Writer) {
	in := bufio.NewReader(r)
	out := bufio.NewWriter(w)
	defer out.Flush()

	var t int
	for Fscan(in, &t); t > 0; t-- {
		var n int
		Fscan(in, &n)

		for i := 0; i < n; i++ {
			var num int
			Fscan(in, &num)
		}
		Fprintln(out, 3 * n)
		table := []int{1,2,1,2,1,2}
		for i := 1; i <= n; i += 2 {
			for _, move := range table {
				Fprintln(out, move, i, i + 1)
			}
		}
	}
}

func main() { run(os.Stdin, os.Stdout) }

func min(a, b int) int {
	if a > b {
		return b
	}
	return a
}

func max(a, b int) int {
	if a > b {
		 return a
	}
	return b
}

func abs(num int) int {
	if num < 0 {
		return -num
	}
	return num
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)

	var n int

	fmt.Fscanf(reader, "%d\n", &n)
	var ans [501][501]int

	for i := 0; i < n; i++ {
		if i < n-1 {
			fmt.Fscanf(reader, "%d ", &ans[i][i])
		} else {
			fmt.Fscanf(reader, "%d\n", &ans[i][i])
		}
	}

	for i := 0; i < n; i++ {

		x, y := i, i

		for num := ans[i][i] - 1; num > 0; num-- {
			if y > 0 && ans[x][y-1] == 0 {
				ans[x][y-1] = ans[i][i]
				y--
			} else if x+1 < n && ans[x+1][y] == 0 {
				ans[x+1][y] = ans[i][i]
				x++
			} else {
				fmt.Println(-1)
				return
			}
		}
	}

	for i, j := 0, 0; i < n; i++ {
		for j = 0; j < i; j++ {
			fmt.Printf("%d ", ans[i][j])
		}

		fmt.Printf("%d\n", ans[i][j])
	}
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var n int
	Fscan(in, &n)
	arr := make([][]int, n)
	for i := 0; i < n; i++ {
		arr[i] = make([]int, n)
		Fscan(in, &arr[i][i])
	}

	// dir := [][]int{{0, -1}, {-1, 0}}
	for i := 0; i < n; i++ {
		cur := arr[i][i]
		k := cur - 1
		x, y := i, i
		for k > 0 {
			if x >= 0 && x < n && y-1 >= 0 && y-1 <= i && arr[x][y-1] == 0 {
				arr[x][y-1] = cur
				y = y - 1
				k--
				continue
			}

			if x+1 >= 0 && x+1 < n && y >= 0 && y <= i && arr[x+1][y] == 0 {
				arr[x+1][y] = cur
				x = x + 1
				k--
				continue
			}

			Fprintln(out, "-1")
			return
		}
	}

	for i := 0; i < n; i++ {
		for j := 0; j <= i; j++ {
			Fprintf(out, "%d ", arr[i][j])
		}
		Fprintln(out)
	}
}

func main() {
	run(os.Stdin, os.Stdout)
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func CF1517C(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var n int
	Fscan(in, &n)
	a := make([][]int, n)
	for i := range a {
		a[i] = make([]int, i+1)
		Fscan(in, &a[i][i])
	}
	for i := 1; i < n; i++ {
		f := false
		for j := 0; j+i < n; j++ {
			if a[j+i-1][j] == i {
				f = true
			}
			if f {
				a[j+i][j] = a[j+i][j+1]
			} else {
				a[j+i][j] = a[j+i-1][j]
			}
		}
	}
	for _, r := range a {
		for _, v := range r {
			Fprint(out, v, " ")
		}
		Fprintln(out)
	}
}

func main() { CF1517C(os.Stdin, os.Stdout) }


package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var n, k int
	fmt.Fscanf(reader, "%d %d\n", &n, &k)
	var s, temp string
	fmt.Fscanf(reader, "%s\n", &s)
	letters := make([]string, 0)
	for i := 1; i <= k; i++ {
		fmt.Fscanf(reader, "%s", &temp)
		letters = append(letters, temp)
		s = strings.Replace(s, temp, "1", -1)
	}
	fmt.Fscanf(reader, "\n")
	var count, ans int64
	for _, ch := range []rune(s) {
		if ch != 49 {
			//fmt.Fprintf(writer, "%d %c %d\n", idx, ch, count)
			if count > 0 {
				ans = ans + ((count * (count + 1)) / 2)
			}
			count = 0
		} else {
			count = count + 1
		}
	}
	ans = ans + ((count * (count + 1)) / 2)
	fmt.Fprintf(writer, "%d\n", ans)
}

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func init() {
	ReadString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	// Split sets the split function for the Scanner. The default split function is ScanLines.
	// Split panics if it is called after scanning has started.
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const MOD = 1000000000 + 7
const ALPHABET_NUM = 26
const INF_INT64 = math.MaxInt64
const INF_BIT60 = 1 << 60

var n, k int
var S []rune
var Avail []rune

func main() {
	n, k = ReadInt2()
	S = ReadRuneSlice()
	for i := 0; i < k; i++ {
		tmp := ReadRuneSlice()
		Avail = append(Avail, tmp[0])
	}

	memo := make([]int, n)
	for i := 0; i < n; i++ {
		if !isAvail(S[i]) {
			memo[i] = -1
		}
	}

	cur := int64(0)
	sums := make([]int64, n)
	for i := 0; i < n; i++ {
		if memo[i] == -1 {
			// アウトなのでリセット
			cur = 0
		} else {
			// 継続
			cur++
		}
		sums[i] = cur
	}

	ans := int64(0)
	for i := 0; i < n; i++ {
		ans += sums[i]
	}
	fmt.Println(ans)
}

func isAvail(r rune) bool {
	for i := 0; i < len(Avail); i++ {
		if Avail[i] == r {
			return true
		}
	}
	return false
}

/*
- MODは最後にとりましたか？
- ループを抜けた後も処理が必要じゃありませんか？
- 和・積・あまりを求められたらint64が必要ではありませんか？
- いきなりオーバーフローはしていませんか？
*/

/*******************************************************************/

package main

import (
	"bufio"
	"fmt"
	"os"
)

var inf int = 0x3f3f3f3f
var reader *bufio.Reader

func init() {
	stdin := os.Stdin
	// stdin, _ = os.Open("1.in")
	reader = bufio.NewReaderSize(stdin, 1<<20)
}

var n, m int
var s string

func main() {
	fmt.Fscan(reader, &n, &m, &s)
	mp := make(map[byte]int)
	for i := 0; i < m; i++ {
		var c string
		fmt.Fscan(reader, &c)
		mp[c[0]] = 1
	}
	var sum,ans int64
	for i := 0; i < n; i++ {
		if mp[s[i]] == 0 {
			ans += sum * (sum + 1) / 2
			sum = 0
		} else {
			sum++
		}
	}
	ans += sum * (sum + 1) / 2
	fmt.Println(ans)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string

	reader := bufio.NewReader(os.Stdin)

	str, _ = reader.ReadString('\n')
	keys, _ = reader.ReadString('\n')

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	var substringLen, result int64
	substringLen = 0
	result = 0
	for i := 0; i < n; i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string

	reader := bufio.NewReader(os.Stdin)

	//input, _ := ioutil.ReadFile("input.txt")
	//str = string(input)
	//keys = "a b c d e f g h i j k l m n o p q r s t u v w x y z"

	str, _ = reader.ReadString('\n')
	keys, _ = reader.ReadString('\n')

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	var substringLen, result int64
	substringLen = 0
	result = 0
	for i := 0; i < n; i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

// Author: sighduck
// URL: https://codeforces.com/contest/1272/problem/C

package main

import (
	"bufio"
	"fmt"
	"os"
)

func Solve(n int, k int, s string, c []string) int64 {
	substringCount := int64(0)
	run := int64(0)
	alphabetMap := make(map[string]bool)
	for _, elem := range c {
		alphabetMap[string(elem)] = true
	}
	for i, elem := range s {
		if alphabetMap[string(elem)] == true {
			run += 1
		}
		if alphabetMap[string(elem)] == false || i == n-1 {
			substringCount += run * (run + 1) / 2
			run = 0
		}
	}
	return substringCount
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var n, k int
	fmt.Fscanf(reader, "%d %d\n", &n, &k)
	var s string
	fmt.Fscanf(reader, "%s\n", &s)
	c := make([]string, k)
	for i := 0; i < k; i++ {
		fmt.Fscanf(reader, "%s", &c[i])
	}

	fmt.Fprintf(writer, "%d\n", Solve(n, k, s, c))
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func main() {
	var n, k uint64
	fmt.Scanf("%d %d\n", &n, &k)

	var s, availChars string
	fmt.Scanln(&s)

	scanner := bufio.NewScanner(os.Stdin)
	if scanner.Scan() {
		availChars = scanner.Text()
	}

	availArray := strings.Split(availChars, " ")
	letterMap := make(map[rune]bool)
	for _, char := range availArray {
		runes := []rune(char)
		letterMap[runes[0]] = true
	}

	var substrings, num uint64
	substrings = 0
	num = 0
	letters := []rune(s)
	for _, char := range letters {
		if letterMap[char] {
			num++
		} else {
			substrings += (uint64)(num * (num + 1) / 2)
			num = 0
		}
	}

	substrings += (uint64)(num * (num + 1) / 2)

	fmt.Println(substrings)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

var inf int = 0x3f3f3f3f
var reader *bufio.Reader

func init() {
	stdin := os.Stdin
	// stdin, _ = os.Open("1.in")
	reader = bufio.NewReaderSize(stdin, 1<<20)
}

var n, m int
var s string

func main() {
	fmt.Fscan(reader, &n, &m, &s)
	mp := make(map[byte]int)
	for i := 0; i < m; i++ {
		var c string
		fmt.Fscan(reader, &c)
		mp[c[0]] = 1
	}
	sum := 0
	ans := 0
	for i := 0; i < n; i++ {
		if mp[s[i]] == 0 {
			ans += sum * (sum + 1) / 2
			sum = 0
		} else {
			sum++
		}
	}
	ans += sum * (sum + 1) / 2
	fmt.Println(ans)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string

	reader := bufio.NewReaderSize(os.Stdin, 300000)
	str, _ = reader.ReadString('\n')
	keys, _ = reader.ReadString('\n')

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	substringLen := 0
	result := 0
	for i := 0; i < len(str); i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string

	reader := bufio.NewReader(os.Stdin)

	//input, _ := ioutil.ReadFile("input.txt")
	//str = string(input)
	//keys = "a b c d e f g h i j k l m n o p q r s t u v w x y z"

	str, _ = reader.ReadString('\n')
	keys, _ = reader.ReadString('\n')

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	substringLen := 0
	result := 0
	for i := 0; i < n; i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string
	fmt.Scanln(&str)

	scanner := bufio.NewScanner(os.Stdin)
	buf := make([]byte, 0, 1024*1024)
	scanner.Buffer(buf, 2048*1024)

	if scanner.Scan() {
		keys = scanner.Text()
	}

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	substringLen := 0
	result := 0
	for i := 0; i < len(str); i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string

	reader := bufio.NewReader(os.Stdin)

	//input, _ := ioutil.ReadFile("input.txt")
	//str = string(input)
	//keys = "a b c d e f g h i j k l m n o p q r s t u v w x y z"

	str, _ = reader.ReadString('\n')
	keys, _ = reader.ReadString('\n')

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	substringLen := 0
	result := int64(0)
	for i := 0; i < n; i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += int64((substringLen * (substringLen + 1)) / 2)
			substringLen = 0
		}
	}

	result += int64((substringLen * (substringLen + 1)) / 2)
	fmt.Println(result)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string

	reader := bufio.NewReader(os.Stdin)

	buf := make([]byte, n+1)
	//str, _ = reader.ReadString('\n')
	reader.Read(buf)
	str = string(buf)
	keys, _ = reader.ReadString('\n')

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	substringLen := 0
	result := 0
	for i := 0; i < len(str); i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string

	scanner := bufio.NewScanner(os.Stdin)
	buf := make([]byte, 0, 1024*1024)
	scanner.Buffer(buf, 2048*1024)

	if scanner.Scan() {
		str = scanner.Text()
	}

	if scanner.Scan() {
		keys = scanner.Text()
	}

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	substringLen := 0
	result := 0
	for i := 0; i < len(str); i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string
	fmt.Scanln(&str)

	scanner := bufio.NewScanner(os.Stdin)
	if scanner.Scan() {
		keys = scanner.Text()
	}

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	substringLen := 0
	result := 0
	for i := 0; i < len(str); i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string

	reader := bufio.NewReader(os.Stdin)
	str, _ = reader.ReadString('\n')
	keys, _ = reader.ReadString('\n')

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	substringLen := 0
	result := 0
	for i := 0; i < len(str); i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var str, keys string
	fmt.Scanln(&str)

	scanner := bufio.NewScanner(os.Stdin)
	buf := make([]byte, 0, 64*1024)
	scanner.Buffer(buf, 2048*1024)

	if scanner.Scan() {
		keys = scanner.Text()
	}

	keyMap := make(map[int]bool)
	for i := 0; i < len(keys); i++ {
		key := int(keys[i])
		if key >= 97 && key <= 122 {
			keyMap[key] = true
		}
	}

	substringLen := 0
	result := 0
	for i := 0; i < len(str); i++ {
		if keyMap[int(str[i])] {
			substringLen++
		} else {
			result += (substringLen * (substringLen + 1)) / 2
			substringLen = 0
		}
	}

	result += (substringLen * (substringLen + 1)) / 2
	fmt.Println(result)
}

// Author: sighduck
// URL: https://codeforces.com/contest/1272/problem/C

package main

import (
	"bufio"
	"fmt"
	"os"
)

func Solve(n int, k int, s string, c []string) int {
	substringCount := 0
	run := 0
	alphabetMap := make(map[string]bool)
	for _, elem := range c {
		alphabetMap[string(elem)] = true
	}
	for i, elem := range s {
		if alphabetMap[string(elem)] == true {
			run += 1
		}
		if alphabetMap[string(elem)] == false || i == n-1 {
			substringCount += run * (run + 1) / 2
			run = 0
		}
	}
	return substringCount
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var n, k int
	fmt.Fscanf(reader, "%d %d\n", &n, &k)
	var s string
	fmt.Fscanf(reader, "%s\n", &s)
	c := make([]string, k)
	for i := 0; i < k; i++ {
		fmt.Fscanf(reader, "%s", &c[i])
	}

	fmt.Fprintf(writer, "%d\n", Solve(n, k, s, c))
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var s, availChars string
	fmt.Scanln(&s)

	scanner := bufio.NewScanner(os.Stdin)
	if scanner.Scan() {
		availChars = scanner.Text()
	}

	availArray := strings.Split(availChars, " ")
	letterMap := make(map[rune]bool)
	for _, char := range availArray {
		runes := []rune(char)
		letterMap[runes[0]] = true
	}

	var substrings uint64
	substrings = 0
	num := 0
	letters := []rune(s)
	for _, char := range letters {
		if letterMap[char] {
			num++
		} else {
			substrings += (uint64)(num * (num + 1) / 2)
			num = 0
		}
	}

	substrings += (uint64)(num * (num + 1) / 2)

	fmt.Println(substrings)
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d\n", &n, &k)

	var s, availChars string
	fmt.Scanln(&s)

	scanner := bufio.NewScanner(os.Stdin)
	if scanner.Scan() {
		availChars = scanner.Text()
	}

	availArray := strings.Split(availChars, " ")
	letterMap := make(map[rune]bool)
	for _, char := range availArray {
		runes := []rune(char)
		letterMap[runes[0]] = true
	}

	substrings := 0
	num := 0
	letters := []rune(s)
	for _, char := range letters {
		if letterMap[char] {
			num++
		} else {
			substrings += num * (num + 1) / 2
			num = 0
		}
	}

	substrings += num * (num + 1) / 2

	fmt.Println(substrings)
}


package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

func (io *IO) Solve() {
	var j, k, h uint
	k = 19
	n, q := io.Int(), io.Int()
	a := io.UIntArray(n)
	last := make([]int, k)
	for j = 0; j < k; j++ {
		last[j] = n
	}
	dp := make([][]int, n)
	for i := n - 1; i >= 0; i-- {
		dp[i] = make([]int, k)
		for j = 0; j < k; j++ {
			if (a[i]>>j)&1 != 0 {
				dp[i][j] = i
			} else {
				dp[i][j] = n
				for h = 0; h < k; h++ {
					if (1<<h)&a[i] != 0 &&
						last[h] < n &&
						dp[last[h]][j] < dp[i][j] {
						dp[i][j] = dp[last[h]][j]
					}
				}
			}
		}
		for j = 0; j < k; j++ {
			if (a[i]>>j)&1 != 0 {
				last[j] = i
			}
		}
	}
	for i := 0; i < q; i++ {
		x, y := io.Int()-1, io.Int()-1
		shi := false
		for j = 0; j < k; j++ {
			if (a[y]>>j)&1 != 0 && dp[x][j] <= y {
				shi = true
				break
			}
		}
		if shi {
			io.Print("Shi\n")
		} else {
			io.Print("Fou\n")
		}
	}
	return
}

func main() {
	NewIO().Solve()
}

type IO struct {
	scanner *bufio.Scanner
	writer  io.Writer
}

func NewIO() *IO {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	return &IO{scanner, os.Stdout}
}

func (io *IO) Skip() {
	io.scanner.Scan()
}

func (io *IO) Int32() (n int32) {
	io.scanner.Scan()
	buf := io.scanner.Bytes()
	for _, v := range buf {
		n = n*10 + int32(v-'0')
	}
	return
}

func (io *IO) Int() (n int) {
	io.scanner.Scan()
	buf := io.scanner.Bytes()
	for _, v := range buf {
		n = n*10 + int(v-'0')
	}
	return
}

func (io *IO) UInt() (n uint) {
	io.scanner.Scan()
	buf := io.scanner.Bytes()
	for _, v := range buf {
		n = n*10 + uint(v-'0')
	}
	return
}

func (io *IO) Bytes() []byte {
	io.scanner.Scan()
	return io.scanner.Bytes()
}

func (io *IO) IntArray(n int) (arr []int) {
	arr = make([]int, n)
	for i := 0; i < n; i++ {
		arr[i] = io.Int()
	}
	return
}

func (io *IO) UIntArray(n int) (arr []uint) {
	arr = make([]uint, n)
	for i := 0; i < n; i++ {
		arr[i] = io.UInt()
	}
	return
}

func (io *IO) Print(a interface{}) {
	fmt.Fprint(io.writer, a)
}

func (io *IO) Printf(format string, a interface{}) {
	fmt.Fprintf(io.writer, format, a)
}

func (io *IO) setBuffer() {
	io.scanner.Buffer(make([]byte, 4096), 512*1024)
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

func (io *IO) Solve() {
	var j, k, h uint
	k = 19
	n, q := io.Int(), io.Int()
	a := io.UIntArray(n)
	last := make([][]int, n)
	last[n-1] = make([]int, k)
	for j = 0; j < k; j++ {
		last[n-1][j] = n
	}
	for i := n - 2; i >= 0; i-- {
		last[i] = make([]int, k)
		for j = 0; j < k; j++ {
			if (1<<j)&a[i+1] != 0 {
				last[i][j] = i + 1
			} else {
				last[i][j] = last[i+1][j]
			}
		}
	}
	go_ := make([][]int, n)
	for i := n - 1; i >= 0; i-- {
		go_[i] = make([]int, k)
		for j = 0; j < k; j++ {
			if (1<<j)&a[i] != 0 {
				go_[i][j] = i
			} else {
				min, isMin := 0, false
				for h = 0; h < k; h++ {
					if (1<<h)&a[i] != 0 {
						lasth := last[i][h]
						if lasth < n {
							goj := go_[lasth][j]
							if !isMin || goj < min {
								min = goj
								isMin = true
							}
						}
					}
				}
				if isMin {
					go_[i][j] = min
				} else {
					go_[i][j] = n
				}
			}
		}
	}
	for i := 0; i < q; i++ {
		x, y := io.Int()-1, io.Int()-1
		shi := false
		for j = 0; j < k; j++ {
			if (1<<j)&a[y] != 0 && go_[x][j] <= y {
				shi = true
				break
			}
		}
		if shi {
			io.Print("Shi\n")
		} else {
			io.Print("Fou\n")
		}
	}
	return
}

func main() {
	NewIO().Solve()
}

type IO struct {
	scanner *bufio.Scanner
	writer  io.Writer
}

func NewIO() *IO {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	return &IO{scanner, os.Stdout}
}

func (io *IO) Skip() {
	io.scanner.Scan()
}

func (io *IO) Int32() (n int32) {
	io.scanner.Scan()
	buf := io.scanner.Bytes()
	for _, v := range buf {
		n = n*10 + int32(v-'0')
	}
	return
}

func (io *IO) Int() (n int) {
	io.scanner.Scan()
	buf := io.scanner.Bytes()
	for _, v := range buf {
		n = n*10 + int(v-'0')
	}
	return
}

func (io *IO) UInt() (n uint) {
	io.scanner.Scan()
	buf := io.scanner.Bytes()
	for _, v := range buf {
		n = n*10 + uint(v-'0')
	}
	return
}

func (io *IO) Bytes() []byte {
	io.scanner.Scan()
	return io.scanner.Bytes()
}

func (io *IO) IntArray(n int) (arr []int) {
	arr = make([]int, n)
	for i := 0; i < n; i++ {
		arr[i] = io.Int()
	}
	return
}

func (io *IO) UIntArray(n int) (arr []uint) {
	arr = make([]uint, n)
	for i := 0; i < n; i++ {
		arr[i] = io.UInt()
	}
	return
}

func (io *IO) Print(a interface{}) {
	fmt.Fprint(io.writer, a)
}

func (io *IO) Printf(format string, a interface{}) {
	fmt.Fprintf(io.writer, format, a)
}

func (io *IO) setBuffer() {
	io.scanner.Buffer(make([]byte, 4096), 512*1024)
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

func (io *IO) Solve() {
	var j, k, h uint
	k = 19
	n, q := io.Int(), io.Int()
	a := io.UIntArray(n)
	last := make([]int, k)
	for j = 0; j < k; j++ {
		last[j] = n
	}
	dp := make([][]int, n)
	for i := n - 1; i >= 0; i-- {
		dp[i] = make([]int, k)
		for j = 0; j < k; j++ {
			dp[i][j] = n
		}
		for j = 0; j < k; j++ {
			if (a[i]>>j)&1 != 0 {
				if last[j] < n {
					for h = 0; h < k; h++ {
						if dp[last[j]][h] < dp[i][h] {
							dp[i][h] = dp[last[j]][h]
						}
					}
				}
				dp[i][j] = i
				last[j] = i
			}
		}
	}
	for i := 0; i < q; i++ {
		x, y := io.Int()-1, io.Int()-1
		shi := false
		for j = 0; j < k; j++ {
			if (a[y]>>j)&1 != 0 && dp[x][j] <= y {
				shi = true
				break
			}
		}
		if shi {
			io.Print("Shi\n")
		} else {
			io.Print("Fou\n")
		}
	}
	return
}

func main() {
	NewIO().Solve()
}

type IO struct {
	scanner *bufio.Scanner
	writer  io.Writer
}

func NewIO() *IO {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	return &IO{scanner, os.Stdout}
}

func (io *IO) Skip() {
	io.scanner.Scan()
}

func (io *IO) Int32() (n int32) {
	io.scanner.Scan()
	buf := io.scanner.Bytes()
	for _, v := range buf {
		n = n*10 + int32(v-'0')
	}
	return
}

func (io *IO) Int() (n int) {
	io.scanner.Scan()
	buf := io.scanner.Bytes()
	for _, v := range buf {
		n = n*10 + int(v-'0')
	}
	return
}

func (io *IO) UInt() (n uint) {
	io.scanner.Scan()
	buf := io.scanner.Bytes()
	for _, v := range buf {
		n = n*10 + uint(v-'0')
	}
	return
}

func (io *IO) Bytes() []byte {
	io.scanner.Scan()
	return io.scanner.Bytes()
}

func (io *IO) IntArray(n int) (arr []int) {
	arr = make([]int, n)
	for i := 0; i < n; i++ {
		arr[i] = io.Int()
	}
	return
}

func (io *IO) UIntArray(n int) (arr []uint) {
	arr = make([]uint, n)
	for i := 0; i < n; i++ {
		arr[i] = io.UInt()
	}
	return
}

func (io *IO) Print(a interface{}) {
	fmt.Fprint(io.writer, a)
}

func (io *IO) Printf(format string, a interface{}) {
	fmt.Fprintf(io.writer, format, a)
}

func (io *IO) setBuffer() {
	io.scanner.Buffer(make([]byte, 4096), 512*1024)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

// Input & Output
var (
	input  = bufio.NewReader(os.Stdin)
	output = bufio.NewWriter(os.Stdout)
)

type Player struct {
	TeamName *string
	Number   int
	HasYC    bool
	HasRC    bool
}

var (
	homeName string
	awayName string
	n        int
	result   int
)

func in() {
	fmt.Fscan(input, &homeName)
	fmt.Fscan(input, &awayName)
	fmt.Fscan(input, &n)
}

func out() {
	defer output.Flush()
}

func run() {
	homePlayers := make([]Player, 100)
	awayPlayers := make([]Player, 100)
	var min, num int
	var team, card string
	for i := 0; i < n; i++ {
		fmt.Fscan(input, &min)
		fmt.Fscan(input, &team)
		fmt.Fscan(input, &num)
		fmt.Fscan(input, &card)
		var player *Player
		if team == "a" {
			player = &awayPlayers[num]
		} else {
			player = &homePlayers[num]
		}

		if player.Number == 0 {
			player.Number = num
			if team == "a" {
				player.TeamName = &awayName
			} else {
				player.TeamName = &homeName
			}

		}
		if player.HasRC {
			continue
		}
		if card == "y" {
			if !player.HasYC {
				player.HasYC = true
			} else {
				player.HasRC = true
				print(player, min)
			}
		} else {
			player.HasRC = true
			print(player, min)
		}
	}
}

func print(player *Player, min int) {
	fmt.Fprintf(output, "%s %d %d\n", *player.TeamName, player.Number, min)
}

func main() {
	in()
	run()
	out()
}

package main

import (
	"fmt"
)

func main() {
	var home, away string
	var n int
	homePlayers := make([]int, 100)
	awayPlayers := make([]int, 100)

	fmt.Scan(&home, &away, &n)

	for i := 0; i < n; i++ {
		var t, no int
		var team, card string
		var players []int

		fmt.Scan(&t, &team, &no, &card)

		if team == "h" {
			players = homePlayers
			team = home
		} else {
			players = awayPlayers
			team = away
		}

		if players[no] >= 2 {
			continue
		}

		if card == "y" {
			players[no]++
		} else {
			players[no] += 2
		}

		if players[no] >= 2 {
			fmt.Println(team, no, t)
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	var team [2]string // team[0] ... home
	var n int
	fmt.Scan(&team[0], &team[1], &n)
	var card [200]int
	for i := 0; i < n; i++ {
		var t, m int
		var ha, yr string
		fmt.Scan(&t, &ha, &m, &yr)
		if ha == "a" {
			m += 100
		}
		if card[m] >= 2 {
			continue
		}
		switch yr {
		case "r":
			card[m] = 2
		case "y":
			card[m]++
		}
		if card[m] == 2 {
			fmt.Printf("%s %d %d\n", team[m/100], m%100, t)
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	var home, away string
	var n int
	fmt.Scan(&home, &away, &n)
	var yellow, out [200]int
	for i := 0; i < n; i++ {
		var t, m int
		var ha, card string
		fmt.Scan(&t, &ha, &m, &card)
		idx := m
		if ha == "a" {
			idx += 100
		}
		record := func() {
			if out[idx] > 0 {
				return
			}
			out[idx] = 1
			team := home
			if ha == "a" {
				team = away
			}
			fmt.Printf("%s %d %d\n", team, m, t)
		}
		if card == "r" {
			record()
			continue
		}
		if yellow[idx] > 0 {
			record()
			continue
		}
		yellow[idx] = 1
	}
}

package main

import (
    "strconv"
    "bufio"
    "os"
    "fmt"
)
// var file, _ = os.Open("input.txt")
// var outfile, _ = os.Create("output.txt")
// var in = bufio.NewScanner(file)
// var out = bufio.NewWriter(outfile)
var in = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func next() string {
    if !in.Scan() {
        panic("Scan error")
    }
    return in.Text()
}

func nextInt() int {
    ret, _ := strconv.Atoi(next())
    return ret
}

func nextFloat() float64 {
    ret, _ := strconv.ParseFloat(next(), 64)
    return ret
}

func main() {
    defer out.Flush()
    in.Split(bufio.ScanWords)
    t1 := next()
    t2 := next()
    n := nextInt()
    h := make(map[int]int)
    a := make(map[int]int)
    for i := 0; i < n; i++ {
        t := next()
        tm := next()
        m := nextInt()
        c := next()
        if tm == "h" {
            if c == "y" && h[m] < 2 {
                h[m]++;
                if h[m] == 2 {
                    fmt.Fprintln(out, t1 + " " + strconv.Itoa(m) + " " + t)
                }
            } else if c == "r" && h[m] < 2 {
                h[m] = 2
                fmt.Fprintln(out, t1 + " " + strconv.Itoa(m) + " " + t)
            }
        } else {
            if c == "y" && a[m] < 2 {
                a[m]++;
                if a[m] == 2 {
                    fmt.Fprintln(out, t2 + " " + strconv.Itoa(m) + " " + t)
                }
            } else if c == "r" && a[m] < 2 {
                a[m] = 2
                fmt.Fprintln(out, t2 + " " + strconv.Itoa(m) + " " + t)
            }

        }
    }

}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

//Wrong
func main() {
	defer writer.Flush()
	scanner.Split(bufio.ScanWords)

	teamNames := []string {next(), next()}
	players := [][]int{make([]int, 100), make([]int, 100)}
	n := nextInt()
	time, number, team := 0, 0, 0
	card := ""

	for ; n > 0; n-- {
		time = nextInt()

		if next() == "h" {
			team = 0
		} else {
			team = 1
		}

		number, card = nextInt(), next()

		if players[team][number] <= 0  {
			if card == "y" {
				if players[team][number] == 0 {
					players[team][number] = -1
				} else {
					players[team][number] = time
					println(teamNames[team], number, time)
				}
			} else {
				players[team][number] = time
				println(teamNames[team], number, time)

			}
		}
	}

}

func next() string {
	if !scanner.Scan() {
		panic("Scan error")
	}
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(next())
	if err != nil {
		panic(err)
	}
	return n
}

func nextFloat() float64 {
	n, err := strconv.ParseFloat(next(), 64)
	if err != nil {
		panic(err)
	}
	return n
}

func println(a ...interface{}) {
	fmt.Fprintln(writer, a...)
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

//Wrong
func main() {
	defer writer.Flush()
	scanner.Split(bufio.ScanWords)

	teamName := []string {next(), next()}
	players := [][]int{make([]int, 100), make([]int, 100)}
	times := [][]int{make([]int, 100), make([]int, 100)}
	n := nextInt()
	time, number, team := 0, 0, 0
	card := ""

	for ; n > 0; n-- {
		time = nextInt()

		if next() == "h" {
			team = 0
		} else {
			team = 1
		}

		number, card = nextInt(), next()

		if players[team][number] <= 0  {
			if card == "y" {
				if players[team][number] == 0 {
					players[team][number] = -1
				} else {
					players[team][number] = time
					times[team][time] = number
				}
			} else {
				players[team][number] = time
				times[team][time] = number
			}
		}
	}
	// println(players)
	printPlayers(teamName[0], times[0])
	printPlayers(teamName[1], times[1])

}

func printPlayers(team string, times []int) {
	for i, v := range times {
		if v >= 1 {
			println(team, v, i)
		}
	}
}

func next() string {
	if !scanner.Scan() {
		panic("Scan error")
	}
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(next())
	if err != nil {
		panic(err)
	}
	return n
}

func nextFloat() float64 {
	n, err := strconv.ParseFloat(next(), 64)
	if err != nil {
		panic(err)
	}
	return n
}

func println(a ...interface{}) {
	fmt.Fprintln(writer, a...)
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

//Wrong
func main() {
	defer writer.Flush()
	scanner.Split(bufio.ScanWords)

	teamName := []string {next(), next()}
	players := [][]int{make([]int, 100), make([]int, 100)}
	n := nextInt()
	time, number, team := 0, 0, 0
	card := ""

	for ; n > 0; n-- {
		time = nextInt()

		if next() == "h" {
			team = 0
		} else {
			team = 1
		}

		number, card = nextInt(), next()

		if players[team][number] <= 0  {
			if card == "y" {
				if players[team][number] == 0 {
					players[team][number] = -1
				} else {
					players[team][number] = time
				}
			} else {
				players[team][number] = time
			}
		}
	}
	// println(players)
	printPlayers(teamName[0], players[0])
	printPlayers(teamName[1], players[1])

}

func printPlayers(team string, players []int) {
	for i, v := range players {
		if v >= 1 {
			println(team, i, v)
		}
	}
}

func next() string {
	if !scanner.Scan() {
		panic("Scan error")
	}
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(next())
	if err != nil {
		panic(err)
	}
	return n
}

func nextFloat() float64 {
	n, err := strconv.ParseFloat(next(), 64)
	if err != nil {
		panic(err)
	}
	return n
}

func println(a ...interface{}) {
	fmt.Fprintln(writer, a...)
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

//Wrong
func main() {
	defer writer.Flush()
	scanner.Split(bufio.ScanWords)

	teamName := []string {next(), next()}
	players := [][]int{make([]int, 100), make([]int, 100)}
	n := nextInt()
	time, number, team := 0, 0, 0
	card := ""

	for ; n > 0; n-- {
		time = nextInt()

		if next() == "h" {
			team = 0
		} else {
			team = 1
		}

		number, card = nextInt(), next()

		if players[team][number] <= 0  {
			if card == "y" {
				if players[team][number] == 0 {
					players[team][number] = -1
				} else {
					players[team][number] = time
				}
			} else {
				players[team][number] = time
			}
		}
	}
	// println(players)
	printPlayers(teamName[0], players[0])
	printPlayers(teamName[1], players[1])

}

func printPlayers(team string, players []int) {
	for i, v := range players {
		if v > 1 {
			println(team, i, v)
		}
	}
}

func next() string {
	if !scanner.Scan() {
		panic("Scan error")
	}
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(next())
	if err != nil {
		panic(err)
	}
	return n
}

func nextFloat() float64 {
	n, err := strconv.ParseFloat(next(), 64)
	if err != nil {
		panic(err)
	}
	return n
}

func println(a ...interface{}) {
	fmt.Fprintln(writer, a...)
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

//Wrong
func main() {
	defer writer.Flush()
	scanner.Split(bufio.ScanWords)

	hName, aName := next(), next()
	n := nextInt()
	players := make([][]int, 2)
	players[0], players[1] = make([]int, 100), make([]int, 100)
	time, number, team := 0, 0, 0
	card := ""

	for ; n > 0; n-- {
		time = nextInt()
		if next() == "h" {
			team = 0
		} else {
			team = 1
		}

		number, card = nextInt(), next()

		if card == "y" {
			if players[team][number] == 0 {
				players[team][number] = 1
			} else {
				players[team][number] = time
			}
		} else {
			players[team][number] = time
		}
	}

	printPlayers(hName, players[0])
	printPlayers(aName, players[1])

}

func printPlayers(team string, players []int) {
	for i, v := range players {
		if v > 1 {
			println(team, i, v)
		}
	}
}

func next() string {
	if !scanner.Scan() {
		panic("Scan error")
	}
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(next())
	if err != nil {
		panic(err)
	}
	return n
}

func nextFloat() float64 {
	n, err := strconv.ParseFloat(next(), 64)
	if err != nil {
		panic(err)
	}
	return n
}

func println(a ...interface{}) {
	fmt.Fprintln(writer, a...)
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

// Input & Output
var (
	input  = bufio.NewReader(os.Stdin)
	output = bufio.NewWriter(os.Stdout)
)

type Player struct {
	TeamName *string
	Number   int
	HasYC    bool
	HasRC    bool
}

var (
	homeName string
	awayName string
	n        int
	result   int
)

func in() {
	fmt.Fscan(input, &homeName)
	fmt.Fscan(input, &awayName)
	fmt.Fscan(input, &n)
}

func out() {
	defer output.Flush()
}

func run() {
	players := make([]Player, 100)
	var min, num int
	var team, card string
	for i := 0; i < n; i++ {
		fmt.Fscan(input, &min)
		fmt.Fscan(input, &team)
		fmt.Fscan(input, &num)
		fmt.Fscan(input, &card)
		player := &players[num]
		if player.Number == 0 {
			player.Number = num
			if team == "a" {
				player.TeamName = &awayName
			} else {
				player.TeamName = &homeName
			}

		}
		if player.HasRC {
			continue
		}
		if card == "y" {
			if !player.HasYC {
				player.HasYC = true
			} else {
				player.HasRC = true
				print(player, min)
			}
		} else {
			player.HasRC = true
			print(player, min)
		}
	}
}

func print(player *Player, min int) {
	fmt.Fprintf(output, "%s %d %d\n", *player.TeamName, player.Number, min)
}

func main() {
	in()
	run()
	out()
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

// Input & Output
var (
	input  = bufio.NewReader(os.Stdin)
	output = bufio.NewWriter(os.Stdout)
)

type Player struct {
	TeamName *string
	Number   int
	HasYC    bool
	HasRC    bool
}

var (
	homeName string
	awayName string
	n        int
	result   int
)

func in() {
	fmt.Fscan(input, &homeName)
	fmt.Fscan(input, &awayName)
	fmt.Fscan(input, &n)
}

func out() {
	defer output.Flush()
}

func run() {
	players := make([]Player, 100)
	var min, num int
	var team, card string
	for i := 0; i < n; i++ {
		fmt.Scan(&min)
		fmt.Scan(&team)
		fmt.Scan(&num)
		fmt.Scan(&card)
		player := &players[num]
		if player.Number == 0 {
			player.Number = num
			if team == "a" {
				player.TeamName = &awayName
			} else {
				player.TeamName = &homeName
			}

		}
		if player.HasRC {
			continue
		}
		if card == "y" {
			if !player.HasYC {
				player.HasYC = true
			} else {
				player.HasRC = true
				print(player, min)
			}
		} else {
			player.HasRC = true
			print(player, min)
		}
	}
}

func print(player *Player, min int) {
	fmt.Fprintf(output, "%s %d %d\n", *player.TeamName, player.Number, min)
}

func main() {
	in()
	run()
	out()
}

package main

import (
	"fmt"
)

func main() {
	var home, away string
	var n int
	fmt.Scan(&home, &away, &n)
	var yellow [200]int
	for i := 0; i < n; i++ {
		var t, m int
		var ha, card string
		fmt.Scan(&t, &ha, &m, &card)
		record := func() {
			team := home
			if ha == "a" {
				team = away
			}
			fmt.Printf("%s %d %d\n", team, m, t)
		}
		if card == "r" {
			record()
			continue
		}
		idx := m
		if ha == "a" {
			idx += 100
		}
		if yellow[idx] > 0 {
			record()
			continue
		}
		yellow[idx] = 1
	}
}