The string $$$s$$$ is given, the string length is odd number. The string consists of lowercase letters of the Latin alphabet.As long as the string length is greater than $$$1$$$, the following operation can be performed on it: select any two adjacent letters in the string $$$s$$$ and delete them from the string. For example, from the string "lemma" in one operation, you can get any of the four strings: "mma", "lma", "lea" or "lem" In particular, in one operation, the length of the string reduces by $$$2$$$.Formally, let the string $$$s$$$ have the form $$$s=s_1s_2 \dots s_n$$$ ($$$n>1$$$). During one operation, you choose an arbitrary index $$$i$$$ ($$$1 \le i < n$$$) and replace $$$s=s_1s_2 \dots s_{i-1}s_{i+2} \dots s_n$$$.For the given string $$$s$$$ and the letter $$$c$$$, determine whether it is possible to make such a sequence of operations that in the end the equality $$$s=c$$$ will be true? In other words, is there such a sequence of operations that the process will end with a string of length $$$1$$$, which consists of the letter $$$c$$$?

The first line of input data contains an integer $$$t$$$ ($$$1 \le t \le 10^3$$$) — the number of input test cases. The descriptions of the $$$t$$$ cases follow. Each test case is represented by two lines:   string $$$s$$$, which has an odd length from $$$1$$$ to $$$49$$$ inclusive and consists of lowercase letters of the Latin alphabet;  is a string containing one letter $$$c$$$, where $$$c$$$ is a lowercase letter of the Latin alphabet.

For each test case in a separate line output:  YES, if the string $$$s$$$ can be converted so that $$$s=c$$$ is true; NO otherwise.  You can output YES and NO in any case (for example, the strings yEs, yes, Yes and YES will be recognized as a positive response).

5

abcde

c

abcde

b

x

y

aaaaaaaaaaaaaaa

a

contest

t

NoteIn the first test case, $$$s$$$="abcde". You need to get $$$s$$$="c". For the first operation, delete the first two letters, we get $$$s$$$="cde". In the second operation, we delete the last two letters, so we get the expected value of $$$s$$$="c".In the third test case, $$$s$$$="x", it is required to get $$$s$$$="y". Obviously, this cannot be done.

package main

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

func ReadLine(inputReader *bufio.Reader) string {
	line, err := inputReader.ReadString('\n')
	if err != nil {
		return ""
	}
	return strings.TrimSpace(string(line))
}

func main() {
	inputReader := bufio.NewReader(os.Stdin)
	a := ReadLine(inputReader)
	t, err := strconv.Atoi(a)
	if err != nil {
		return
	}
	var answers []string
	for i := 0; i < t; i++ {
		text := ReadLine(inputReader)
		symb := ReadLine(inputReader)
		chet := false
		nechen := false
		for i, r := range text {
			if fmt.Sprintf("%c", r) == symb {
				if (i + 1) % 2 == 0 {
					chet = true
				} else {
					nechen = true
				}
			}
		}
		if chet && !nechen {
			answers = append(answers,"NO" )
		} else if nechen {
			answers = append(answers,"YES")
		} else {
			answers = append(answers,"NO" )
		}

	}
	for _ ,r := range answers {
		fmt.Println(r)
	}

}

package main

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

func ReadLine(inputReader *bufio.Reader) string {
	line, err := inputReader.ReadString('\n')
	if err != nil {
		return ""
	}
	return strings.TrimSpace(line)
}

func main() {
	inputReader := bufio.NewReader(os.Stdin)
	a := ReadLine(inputReader)
	t, err := strconv.Atoi(a)
	if err != nil {
		return
	}
	var answers []string

	for i := 0; i < t; i++ {
		value := ReadLine(inputReader)
		x := ReadLine(inputReader)
		if detect(value, x) {
			answers = append(answers, "YES")
		} else {
			answers = append(answers, "NO")
		}
	}
	for _, r := range answers {
		fmt.Println(r)
	}
}

func detect(value string, toFind string) bool {
	for i, x := range value {
		if string(x) == toFind {
			newV := deleteAllBefore(value, i)
			if len(newV) == 1 {
				return true
			}
			newV = deleteAllAfter(newV, strings.Index(newV, toFind))
			if len(newV) == 1 {
				return true
			}
		}
	}
	return false
}

func deleteAllBefore(value string, i int) string {
	if i%2 == 0 {
		return value[i:]
	}
	if len(value[:i]) == 2 {
		return value[i:]
	}
	return value
}

func deleteAllAfter(value string, i int) string {
	if i%2 == 0 {
		return value[:i+1]
	}
	if len(value[i+1:]) == 2 {
		return value[:i+1]
	}
	return value
}

package main

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

func ReadLine(inputReader *bufio.Reader) string {
	line, err := inputReader.ReadString('\n')
	if err != nil {
		return ""
	}
	return strings.TrimSpace(line)
}

func main() {
	inputReader := bufio.NewReader(os.Stdin)
	a := ReadLine(inputReader)
	t, err := strconv.Atoi(a)
	if err != nil {
		return
	}
	var answers []string

	for i := 0; i < t; i++ {
		b := ReadLine(inputReader)
		value := ReadLine(inputReader)
		if detect(b, value) {
			answers = append(answers, "YES")
		} else {
			answers = append(answers, "NO")
		}

		//n, err := strconv.Atoi(b)
		//if err != nil {
		//	return
		//}
		//
		//variables := make([]int64, n)
		//s := strings.Split(value, " ")
		//for j := 0; j < n; j++ {
		//	number, err := strconv.Atoi(s[j])
		//	if err != nil {
		//		return
		//	}
		//	variables[j] = int64(number)
		//}
		//
		//sort.Slice(variables, func(i, j int) bool {
		//	return variables[i] > variables[j]
		//})
		//flag := false
		//if len(variables) > 2 {
		//	var prefixSum int64 = 0
		//	var postfiSum int64 = variables[len(variables)-1]
		//	if prefixSum > postfiSum {
		//		answers = append(answers, "YES")
		//		continue
		//	}
		//	for j := 0; j < int(len(variables)/2); j++ {
		//		prefixSum += variables[j]
		//		postfiSum += variables[len(variables)-1-(j+1)]
		//		if prefixSum > postfiSum {
		//			flag = true
		//			break
		//		}
		//	}
		//}
		//
		//if flag {
		//	answers = append(answers, "YES")
		//} else {
		//	answers = append(answers, "NO")
		//}
	}
	for _, r := range answers {
		fmt.Println(r)
	}
}

//
//func main() {
//	fmt.Println(detect("abcde", "c"))
//	fmt.Println(detect("abcde", "b"))
//	fmt.Println(detect("b", "x"))
//	fmt.Println(detect("aaaaaaaaaaaaaaa", "a"))
//	fmt.Println(detect("contest", "t"))
//	fmt.Println(detect("tconaes", "t"))
//}
//
func detect(value string, toFind string) bool {
	for i, x := range value {
		if string(x) == toFind {
			newV := deleteAllBefore(value, i)
			if len(newV) == 1 {
				return true
			}
			newV = deleteAllAfter(newV, strings.Index(newV, toFind))
			if len(newV) == 1 {
				return true
			}
		}
	}
	return false
}

func deleteAllBefore(value string, i int) string {
	if i%2 == 0 {
		return value[i:]
	}
	if len(value[:i]) == 2 {
		return value[i:]
	}
	return value
}

func deleteAllAfter(value string, i int) string {
	if i%2 == 0 {
		return value[:i+1]
	}
	if len(value[i+1:]) == 2 {
		return value[:i+1]
	}
	return value
}

//func deleteAllBefore(value string, i int) string {
//	if len(value[:i]) == 2 {
//		return value[i:]
//	}
//	return value
//}
//
//func deleteAllAfter(value string, i int) string {
//	if len(value[i+1:]) == 2 {
//		return value[:i+1]
//	}
//	return value
//}

package main

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

type CF1650A struct {
	sc        *bufio.Reader
	split     []string
	index     int
	separator string
}

func (in *CF1650A) GetLine() string {
	line, err := in.sc.ReadString('\n')
	if err != nil {
		fmt.Println("error line:", line, " err: ", err)
	}
	in.split = []string{}
	in.index = 0
	return line
}
func (in *CF1650A) load() {
	if len(in.split) <= in.index {
		in.split = strings.Split(in.GetLine(), in.separator)
		in.index = 0
	}
}

func (in *CF1650A) NextInt() int {
	in.load()
	val, _ := strconv.Atoi(strings.TrimSpace(in.split[in.index]))
	in.index++
	return val
}

func (in *CF1650A) NextInt64() int64 {
	in.load()
	val, _ := strconv.ParseInt(strings.TrimSpace(in.split[in.index]), 10, 64)
	in.index++
	return val
}

func (in *CF1650A) NextString() string {
	in.load()
	val := strings.TrimSpace(in.split[in.index])
	in.index++
	return val
}

/**
Run solve the problem CF1650A
Date: 11/03/22
User: pepradere
URL: https://codeforces.com/problemset/problem/1650/A
Problem: CF1650A
**/
func (in *CF1650A) Run() {
	for t := in.NextInt(); t > 0; t-- {
		str := in.NextString()
		char := in.NextString()[0]

		ans := false
		for i := 0; i < len(str); i++ {
			if str[i] == char && i%2 == 0{
					ans = true
					break
			}
		}

		if ans {
			fmt.Println("YES")
		}else {
			fmt.Println("NO")
		}
	}
}

func NewCF1650A(r *bufio.Reader) *CF1650A {
	return &CF1650A{
		sc:        r,
		split:     []string{},
		index:     0,
		separator: " ",
	}
}

func main() {
	NewCF1650A(bufio.NewReader(os.Stdin)).Run()
}

package main

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

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

	var T int
	var s, t string
o:
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &s, &t)
		if len(s)&1 > 0 {
			for i := range s {
				if s[i] == t[0] && i&1 == 0 {
					Fprintln(out, "YES")
					continue o
				}
			}
		}
		Fprintln(out, "NO")
	}
}

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

package main
import ."fmt"

// github.com/EndlessCheng/codeforces-go
func main() {
	T,s,t:=0,"",""
o:  for Scan(&T); T > 0; T-- {
		Scan(&s, &t)
		if len(s)&1 > 0 {
			for i := range s {
				if s[i] == t[0] && i&1 == 0 {
					Println("YES")
					continue o
				}
			}
		}
		Println("NO")
	}
}

package main

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

func main() {
	var (
		t int
	)

	reader := bufio.NewReader(os.Stdin)
	fmt.Scanf("%d\n", &t)

	for t > 0 {
		t--

		s, _ := reader.ReadString('\n')
		if s[len(s)-1] == 10 {
			s = s[:len(s)-1]
		}
		if s[len(s)-1] == 13 {
			s = s[:len(s)-1]
		}

		c, _ := reader.ReadString('\n')
		if c[len(c)-1] == 10 {
			c = c[:len(c)-1]
		}
		if c[len(c)-1] == 13 {
			c = c[:len(c)-1]
		}

		done := false
		//if len(s) > 1 {

			visa := make([]bool, len(s))
			cc := 0

			for i := 0; i < len(s); i++  {
				visa[i] = false
				if byte(s[i]) == []byte(c)[0] {
					cc++
				}
			}

			for done == false && cc > 0 {
				fhc := 0
				shc := 0
				fhd := false
				vis := false
				for i := 0; i < len(s); i++ {
					if fhd == true {
						shc++
					}
					if byte(s[i]) == []byte(c)[0] && vis == false && visa[i] == false {
						vis = true
						visa[i] = true
						fhd = true
						cc--
					}
					if fhd == false {
						fhc++
					}
				}
				if fhc % 2 == 0 && shc % 2 == 0 {
					done = true
				}
			}
		//}
		if done == true {
			fmt.Println("YES")
		} else {
                        fmt.Println("NO")
		}
	}
}

package main

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

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

	var T int
	fmt.Fscan(in, &T)

	for t := 0; t < T; t++ {
		var s, c string
		fmt.Fscan(in, &s, &c)

		var f bool
		for i, v := range s {
			if v == rune(c[0]) {
				if i%2 == 0 {
					f = true
				}
			}
		}

		if !f {
			fmt.Fprintln(out, "NO")
		} else {
			fmt.Fprintln(out, "YES")
		}

	}
}

package main

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

/*

 */

//goland:noinspection GoUnhandledErrorResult
func solve() {
	var s, c string
	scanf("%s\n%s\n", &s, &c)

	for i, r := range s {
		if byte(r) == c[0] && i%2 == 0 {
			fmt.Fprintln(writer, "YES")
			return
		}
	}

	fmt.Fprintln(writer, "NO")
}

//goland:noinspection GoUnhandledErrorResult
func main() {
	defer writer.Flush()

	t := 1
	scanf("%d\n", &t)

	for ; t > 0; t-- {
		solve()
	}
}

const maxUint = ^uint(0)

//goland:noinspection GoUnusedConst
const minUint = 0
const maxInt = int(maxUint >> 1)

//goland:noinspection GoUnusedConst
const minInt = -maxInt - 1

var reader = bufio.NewReader(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

func scanf(f string, a ...interface{}) {
	if _, err := fmt.Fscanf(reader, f, a...); err != nil {
		panic(err)
	}
}

//goland:noinspection GoUnusedFunction
func reversed(s string) string {
	input := []rune(s)
	li := len(input)
	ret := make([]rune, li)
	for i, r := range input {
		ret[li-i-1] = r
	}
	return string(ret)
}

//goland:noinspection GoUnusedFunction
func divCeil(num, div int) int {
	quot := num / div
	if num%div != 0 {
		quot++
	}
	return quot
}

//goland:noinspection GoUnusedFunction
func min(nums ...int) int {
	minimum := nums[0]
	for _, num := range nums {
		if num < minimum {
			minimum = num
		}
	}
	return minimum
}

//goland:noinspection GoUnusedFunction
func max(nums ...int) int {
	idx := nums[0]
	for i, num := range nums {
		if num > nums[idx] {
			idx = i
		}
	}

	return nums[idx]
}

//goland:noinspection GoUnusedFunction
func abs(num int) int {
	if num < 0 {
		return -num
	}
	return num
}

//goland:noinspection GoUnusedFunction
func isPrime(num int) bool {
	if num == 2 || num == 3 {
		return true
	}

	if num <= 1 || num%2 == 0 || num%3 == 0 {
		return false
	}

	for i := 5; i*i <= num; i += 6 {
		if num%i == 0 || num%(i+2) == 0 {
			return false
		}
	}

	return true
}

//goland:noinspection GoUnusedFunction
func gcd(a, b int) int {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

//goland:noinspection GoUnusedFunction
func lcm(a, b int) int {
	return abs(a) / gcd(a, b) * abs(b)
}

// Examples:
//	digitAt(1234, -1) -> panic!
//	digitAt(1234, 0) -> 4
//	digitAt(1234, 1) -> 3
//	digitAt(1234, 2) -> 2
//	digitAt(1234, 3) -> 1
//	digitAt(1234, 4) -> panic!
//goland:noinspection GoUnusedFunction
func digitAt(num, pos int) int {
	if num == 0 {
		return 0
	}

	num = abs(num)

	lenNum := int(math.Log10(float64(num))) + 1
	if pos < 0 || pos >= lenNum {
		err := fmt.Sprintf("Out of bound access for digit. Position passed %d, number %d", pos, num)
		panic(err)
	}

	rem := num % int(math.Pow10(pos+1))
	return rem / int(math.Pow10(pos))
}

package main

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

func solve(cin *scanner, cout *writer, cerr *writer) {
	s := cin.Next()
	t := []rune(cin.Next())[0]
	for i, c := range s {
		if i%2 == 1 {
			continue
		}
		if c == t {
			cout.Println("YES")
			return
		}
	}
	cout.Println("NO")
}

func main() {
	cin := NewScanner(os.Stdin)
	cout, cerr := NewWriter(os.Stdout), NewWriter(os.Stderr)
	defer cout.Flush()
	defer cerr.Flush()
	t := cin.NextInt()
	// t := 1
	for ti := 0; ti < t; ti++ {
		solve(cin, cout, cerr)
	}
}

// Template Bolierplate {{{
type scanner struct {
	*bufio.Scanner
}

func NewScanner(r io.Reader) *scanner {
	s := bufio.NewScanner(r)
	s.Split(bufio.ScanWords)
	s.Buffer(nil, 1024*1024)
	return &scanner{s}
}

func (i *scanner) Next() string {
	i.Scan()
	return i.Text()
}

func (i *scanner) Nexts(n int) []string {
	res := make([]string, n)
	for j := range res {
		res[j] = i.Next()
	}
	return res
}

func (i *scanner) NextInt() int {
	v, _ := strconv.Atoi(i.Next())
	return v
}

func (i *scanner) NextInt64() int64 {
	v, _ := strconv.ParseInt(i.Next(), 10, 64)
	return v
}

func (i *scanner) NextInts(n int) []int {
	res := make([]int, n)
	for j := range res {
		res[j] = i.NextInt()
	}
	return res
}

func (i *scanner) NextInt64s(n int) []int64 {
	res := make([]int64, n)
	for j := range res {
		res[j] = i.NextInt64()
	}
	return res
}

type writer struct {
	w *bufio.Writer
}

func NewWriter(w io.Writer) *writer {
	return &writer{bufio.NewWriter(w)}
}

func (i *writer) Print(a ...interface{}) {
	fmt.Fprint(i.w, a...)
}

func (i *writer) Println(a ...interface{}) {
	fmt.Fprintln(i.w, a...)
}

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

func (i *writer) Flush() {
	i.w.Flush()
}

// }}}

// vim: fdm=marker

package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	t, _ := strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		x := 0
		scanner.Scan()
		sls := strings.Split(scanner.Text(), "")
		scanner.Scan()
		c := scanner.Text()
		for j := 0; j < len(sls); j += 2 {
			if sls[j] == c {
				x++
			}
		}
		if x > 0 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main
import(
    "fmt"
    "strings"
)
func main() {
	var t int
	fmt.Scan(&t)
	for i:=0;i<t;i++{
		var word,letter string
		fmt.Scan(&word,&letter)
		if strings.IndexAny(word,letter) == -1 {
			fmt.Println("NO")
		} else {
			for j:=0;j<len(word);j++ {
				if string(word[j]) == letter {
					if j%2 == 0 {
						fmt.Println("YES")
						goto out
					}
				}
			}
			fmt.Println("NO")
			out:
		}
	}
}

package main

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

var (
	in  = bufio.NewReader(os.Stdin)
	out = bufio.NewWriter(os.Stdout)
)

func main() {
	defer out.Flush()
	var t int
	fmt.Fscan(in, &t, "\n")
	for ; t > 0; t-- {
		var str string
		var ch string

		fmt.Fscan(in, &str, "\n")
		fmt.Fscan(in, &ch, "\n")
		flag := false
		arr := make([]int, 0)
		for idx, val := range str {
			if uint8(val) == ch[0] {
				arr = append(arr, idx)
			}
		}
		length := len(str)
		for _, val := range arr {
			front := val
			end := length - val - 1
			if (front%2 == 0) && (end%2 == 0) {
				flag = true
			}
		}
		if flag {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}
	}
}

package main
import (
	"bufio"
	"fmt"
	"log"
	"os"
	"strconv"
)

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

	//count, _ := reader.ReadString('\n')
	//n, _ := strconv.Atoi(count)
	inputString := make([]string, 0)
	inputChar := make([]byte, 0)
	//for i:= 0; i < n; i++ {
	//	str, _ := reader.ReadString('\n')
	//	char, _ := reader.ReadByte()
	//	inputChar = append(inputChar, char)
	//	inputString = append(inputString, str)
	//
	//}
	i := 0
	n := 0
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		if i == 0 {
			count := scanner.Text()
			n, _ = strconv.Atoi(count)
			i++
			continue
		}

		inputString = append(inputString, scanner.Text())
		scanner.Scan()
		inputChar = append(inputChar, scanner.Text()[0])

		if i == n {
			break
		}
		i++
	}

	if err := scanner.Err(); err != nil {
		log.Println(err)
	}

	for i := range inputString {
		fmt.Println(checkString(inputString[i], inputChar[i]))
	}
}

func checkString(s string, c byte) string {
	for i := range s {
		if s[i] == c && (i+1)%2 != 0 {
			return "yes"
		}
	}
	return "no"
}

package main

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

func main() {
	in, out := bufio.NewReader(os.Stdin), bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 0
	_, _ = fmt.Fscan(in, &t)
	for ii := 0; ii < t; ii++ {
		var s, c string
		_, _ = fmt.Fscan(in, &s, &c)
		i, j := 0, 0
		last := -1
		for i < len(s) && j < len(c) {
			if s[i] == c[j] && (i-last)&1 == 1 {
				last = i
				j++
			}
			i++
		}
		if j == len(c) {
			_, _ = fmt.Fprintln(out, "YES")
		} else {
			_, _ = fmt.Fprintln(out, "NO")
		}
	}
}

package main

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

func main() {
	inputReader := bufio.NewReader(os.Stdin)
	a := ReadLine(inputReader)

	numCases, _ := strconv.Atoi(a)

	answers := make([]string, numCases)
	for i := 0; i < numCases; i++ {
		str := ReadLine(inputReader)
		letter := ReadLine(inputReader)
		ans := processLine(str, letter[0])
		answers[i] = ans
	}

	for _, res := range answers {
		fmt.Println(res)
	}
}

func ReadLine(inputReader *bufio.Reader) string {
	line, err := inputReader.ReadString('\n')
	if err != nil {
		return ""
	}

	return strings.TrimSpace(string(line))
}

func processLine(line string, letter byte) string {
	for i := 0; i < len(line); i++ {
		if line[i] == letter && (i+1)%2 != 0 {
			return "yes"
		}
	}
	return "no"
}

package main

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

func CF1650A(rawIn io.Reader, rawOut io.Writer) {
	in := bufio.NewReader(rawIn)
	out := bufio.NewWriter(rawOut)
	defer out.Flush()

	var cases int
	fmt.Fscan(in, &cases)
	for cc := 0; cc < cases; cc++ {
		var s string
		fmt.Fscan(in, &s)
		var c string
		fmt.Fscan(in, &c)

		can := false
		for i, sc := range s {
			scs := string(sc)
			if scs == c && i%2 == 0 {
				can = true
				break
			}
		}

		if can {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}
	}
}

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

package main

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

func solve() {
	f := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	N, s, c := 0, "", ""
	fmt.Fscan(f, &N)
	for i := 0; i < N; i++ {
		fmt.Fscan(f, &s, &c)
		ok, n := false, len(s)
		for j := 0; j < n; j++ {
			if string(s[j]) == c && j&1 == 0 && (n-j-1)&1 == 0 {
				ok = true
				break
			}
		}
		if ok {
			fmt.Fprintln(w, "YES")
		} else {
			fmt.Fprintln(w, "NO")
		}
	}
	w.Flush()
}

func main() {
	solve()
}

package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scanln(&n)
	var str []byte
	var letter string

	for i := 0; i < n; i++ {
		var checker bool
		fmt.Scanln(&str)
		fmt.Scanln(&letter)
		for j := 0; j < len(str); j++ {
			if str[j] == []byte(letter)[0] && (j+1)%2 != 0 {
				checker = true
				break
			}
		}
		if checker {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

const mod = 998244353
const mx = 3000

func solve(in *bufio.Reader, out *bufio.Writer) {
	defer out.Flush()
	var n int
	fmt.Fscan(in,&n)
	var s1,s2 string
	fmt.Fscan(in,&s1,&s2)
	prev := -1
	cur := 0
	for i := range s1{
		if s1[i] == s2[cur] && (i - prev) % 2 == 1{
			cur++
		}
		if cur == len(s2){
			fmt.Fprintln(out,"Yes")
			return
		}
	}
	fmt.Fprintln(out,"No")
}

func sum(a,b int64)int64{
	return (b + a) * (b - a + 1) / 2
}

func max(a,b int)int{
	if a > b{
		return a
	}
	return b
}
func min(a,b int64)int64{
	if a > b{
		return b
	}
	return a
}
func gcd(a,b int)int{
	if a % b == 0{
		return b
	}
	return gcd(b,a%b)
}

func main() {
	stdin := os.Stdin
	stdout := os.Stdout
	in := bufio.NewReader(stdin)
	out := bufio.NewWriter(stdout)
	n := 1
	fmt.Fscan(in, &n)
	for i := 0; i < n; i++ {
		solve(in, out)
	}
}

//nolint
package main

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

//{
var reader = bufio.NewReader(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }
func print(a ...interface{})            { fmt.Fprint(writer, a...) }
func println(a ...interface{})          { fmt.Fprintln(writer, a...) }
func scan(a ...interface{})             { fmt.Fscan(reader, a...) }

func main() {
	defer writer.Flush()

	Main()
}

func Main() {
	var t int
	scan(&t)
	for ; t > 0; t-- {
		Solve()
	}
}

//}

func Solve() {
	var st, tp string
	scan(&st, &tp)
	c := rune(tp[0])
	for i, ch := range st {
		if ch == c && i%2 == 0 {
			println("YES")
			return
		}
	}
	println("NO")
}

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	t := readInt(reader)
	for t > 0 {
		s, _ := reader.ReadString('\n')
		s = strings.ReplaceAll(s, "\r", "")
		s = strings.ReplaceAll(s, "\n", "")

		c, _ := reader.ReadString('\n')
		c = strings.ReplaceAll(c, "\r", "")
		c = strings.ReplaceAll(c, "\n", "")

		kokoko(s, c)
		t--
	}
}

func kokoko(s, c string) {
	if !strings.Contains(s, c) {
		fmt.Println("NO")
		return
	}
	for i := range s {
		if s[i] == c[0] && i%2 == 0 {
			fmt.Println("YES")
			return
		}
	}
	fmt.Println("NO")
	return
}

func readInt(in *bufio.Reader) int {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.Atoi(nStr)
	return n
}

func readLineNumbs(in *bufio.Reader) []string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")
	numbs := strings.Split(line, " ")
	return numbs
}

func debug(name string, a interface{}) {
	fmt.Printf("\n%s = %v \n", name, a)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {
    defer writer.Flush()

    var t int
    scanf("%d\n", &t)

    for (t > 0) {
        var s,c string
        flag := 0
        i := 0
        scanf("%s\n%s\n", &s, &c)

        for i = 0 ; i < len(s); i++ {
            if (s[i] == c[0] && (i % 2) == 0) {
                flag = 1
                break
            }
        }

        if (flag == 1) {
            printf("YES\n")
        }else {
            printf("NO\n")
        }
        t--
    }
}

package main

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

func readInt(in *bufio.Reader) int {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.Atoi(nStr)
	return n
}

func readInt64(in *bufio.Reader) int64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseInt(nStr, 10, 64)
	return n
}

func readLineNumbs(in *bufio.Reader) []string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")
	numbs := strings.Split(line, " ")
	return numbs
}

func readString(in *bufio.Reader) string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")
	return line
}

func readArrInt(in *bufio.Reader) []int {
	numbs := readLineNumbs(in)
	arr := make([]int, len(numbs))
	for i, n := range numbs {
		val, _ := strconv.Atoi(n)
		arr[i] = val
	}
	return arr
}

func readArrInt64(in *bufio.Reader) []int64 {
	numbs := readLineNumbs(in)
	arr := make([]int64, len(numbs))
	for i, n := range numbs {
		val, _ := strconv.ParseInt(n, 10, 64)
		arr[i] = val
	}
	return arr
}

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)

	defer out.Flush()

	n := readInt(in)

	for i := 0; i < n; i++ {
		input := readString(in)
		search := readString(in)

		res := Solve(input, search)

		fmt.Fprintf(out, "%s\n", res)
	}
}

func Solve(in string, s string) string {
	for i, c := range in {
		if string(c) == string(s[0]) && (i+1)%2 != 0 {
			return fmt.Sprint("YES")
		}
	}

	return fmt.Sprint("NO")
}

package main

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

func main() {
	_r, _w := os.Stdin, os.Stdout
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	var solve func()
	// Todo...
	solve = func() {
		var a string
		var b string
		Fscan(in, &a)
		Fscan(in, &b)
		n := len(a)
		for i := 0; i < n; i++ {
			if a[i] == b[0] && (i%2 == 0) && ((n-i-1)%2 == 0) {
				Fprintln(out, "YES")
				return
			}
		}
		Fprintln(out, "NO")
		//Fprintln(out, a, b)
	}
	// End...
	var T int = 1
	Fscan(in, &T)
	for i := 0; i < T; i++ {
		solve()
	}
}

package main

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

func ReadLine(inputReader *bufio.Reader) string {
	line, err := inputReader.ReadString('\n')
	if err != nil {
		return ""
	}
	return strings.TrimSpace(string(line))
}

func main() {
	inputReader := bufio.NewReader(os.Stdin)
	a := ReadLine(inputReader)
	t, err := strconv.Atoi(a)
	if err != nil {
		return
	}
	var answers []string
	for i := 0; i < t; i++ {
		text := ReadLine(inputReader)
		symb := ReadLine(inputReader)
		chet := false
		nechen := false
		for i, r := range text {
			if fmt.Sprintf("%c", r) == symb {
				if (i + 1) % 2 == 0 {
					chet = true
				} else {
					nechen = true
				}
			}
		}
		if chet && !nechen {
			answers = append(answers,"NO" )
			fmt.Println("NO")
		} else if nechen {
			answers = append(answers,"YES")
		} else {
			answers = append(answers,"NO" )
		}

	}
	for _ ,r := range answers {
		fmt.Println(r)
	}

}

package main

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

func ReadLine(inputReader *bufio.Reader) string {
	line, err := inputReader.ReadString('\n')
	if err != nil {
		return ""
	}
	return strings.TrimSpace(string(line))
}

func main() {
	inputReader := bufio.NewReader(os.Stdin)
	a := ReadLine(inputReader)
	t, err := strconv.Atoi(a)
	if err != nil {
		return
	}
	var answers []string
	for i := 0; i < t; i++ {
		text := ReadLine(inputReader)
		symb := ReadLine(inputReader)
		chet := false
		nechen := false
		for i, r := range text {
			if fmt.Sprintf("%c", r) == symb {
				if (i + 1) % 2 == 0 {
					chet = true
				} else {
					nechen = true
				}
			}
		}
		fmt.Println(chet,nechen)
		if chet && !nechen {
			answers = append(answers,"NO" )
			fmt.Println("NO")
		} else if nechen {
			answers = append(answers,"YES")
		} else {
			answers = append(answers,"NO" )
		}

	}
	for _ ,r := range answers {
		fmt.Println(r)
	}

}

package main

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

type CF1650A struct {
	sc        *bufio.Reader
	split     []string
	index     int
	separator string
}

func (in *CF1650A) GetLine() string {
	line, err := in.sc.ReadString('\n')
	if err != nil {
		fmt.Println("error line:", line, " err: ", err)
	}
	in.split = []string{}
	in.index = 0
	return line
}
func (in *CF1650A) load() {
	if len(in.split) <= in.index {
		in.split = strings.Split(in.GetLine(), in.separator)
		in.index = 0
	}
}

func (in *CF1650A) NextInt() int {
	in.load()
	val, _ := strconv.Atoi(strings.TrimSpace(in.split[in.index]))
	in.index++
	return val
}

func (in *CF1650A) NextInt64() int64 {
	in.load()
	val, _ := strconv.ParseInt(strings.TrimSpace(in.split[in.index]), 10, 64)
	in.index++
	return val
}

func (in *CF1650A) NextString() string {
	in.load()
	val := strings.TrimSpace(in.split[in.index])
	in.index++
	return val
}

/**
Run solve the problem CF1650A
Date: 11/03/22
User: pepradere
URL: https://codeforces.com/problemset/problem/1650/A
Problem: CF1650A
**/
func (in *CF1650A) Run() {
	for t := in.NextInt(); t > 0; t-- {
		str := in.NextString()
		char := in.NextString()[0]

		ans := false
		for i := 0; i < len(str); i++ {
			if str[i] == char{
				if i==0 || i == len(str)-1 || i == len(str)/2 {
					ans = true
					break
				}
			}
		}

		if ans {
			fmt.Println("YES")
		}else {
			fmt.Println("NO")
		}
	}
}

func NewCF1650A(r *bufio.Reader) *CF1650A {
	return &CF1650A{
		sc:        r,
		split:     []string{},
		index:     0,
		separator: " ",
	}
}

func main() {
	NewCF1650A(bufio.NewReader(os.Stdin)).Run()
}

package main

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

func main() {
	var (
		t int
	)

	reader := bufio.NewReader(os.Stdin)
	fmt.Scanf("%d\n", &t)

	for t > 0 {
		t--

		s, _ := reader.ReadString('\n')
		if s[len(s)-1] == 10 {
			s = s[:len(s)-1]
		}
		if s[len(s)-1] == 13 {
			s = s[:len(s)-1]
		}

		c, _ := reader.ReadString('\n')
		if c[len(c)-1] == 10 {
			c = c[:len(c)-1]
		}
		if c[len(c)-1] == 13 {
			c = c[:len(c)-1]
		}

		done := false
		if len(s) > 1 {

			visa := make([]bool, len(s))
			cc := 0

			for i := 0; i < len(s); i++  {
				visa[i] = false
				if byte(s[i]) == []byte(c)[0] {
					cc++
				}
			}

			for done == false && cc > 0 {
				fhc := 0
				shc := 0
				fhd := false
				vis := false
				for i := 0; i < len(s); i++ {
					if fhd == true {
						shc++
					}
					if byte(s[i]) == []byte(c)[0] && vis == false && visa[i] == false {
						vis = true
						visa[i] = true
						fhd = true
						cc--
					}
					if fhd == false {
						fhc++
					}
				}
				if fhc % 2 == 0 && shc % 2 == 0 {
					done = true
				}
			}
		}
		if done == true {
			fmt.Println("YES")
		} else {
            fmt.Println("NO")
		}
	}
}

package main

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

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

	var T int
	fmt.Fscan(in, &T)

	for t := 0; t < T; t++ {
		var s, c string
		fmt.Fscan(in, &s, &c)

		var f bool
		fmt.Println(s, c)
		for i, v := range s {
			if v == rune(c[0]) {
				if i%2 == 0 {
					f = true
				}
			}
		}

		if !f {
			fmt.Fprintln(out, "NO")
		} else {
			fmt.Fprintln(out, "YES")
		}

	}
}

package main

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

/*

 */

//goland:noinspection GoUnhandledErrorResult
func solve() {
	var s, c string
	scanf("%s\n%s\n", &s, &c)

	for i, r := range s {
		if byte(r) == c[0] && i != 1 && i != len(s)-2 {
			fmt.Fprintln(writer, "YES")
			return
		}
	}

	fmt.Fprintln(writer, "NO")
}

//goland:noinspection GoUnhandledErrorResult
func main() {
	defer writer.Flush()

	t := 1
	scanf("%d\n", &t)

	for ; t > 0; t-- {
		solve()
	}
}

const maxUint = ^uint(0)

//goland:noinspection GoUnusedConst
const minUint = 0
const maxInt = int(maxUint >> 1)

//goland:noinspection GoUnusedConst
const minInt = -maxInt - 1

var reader = bufio.NewReader(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)

func scanf(f string, a ...interface{}) {
	if _, err := fmt.Fscanf(reader, f, a...); err != nil {
		panic(err)
	}
}

//goland:noinspection GoUnusedFunction
func reversed(s string) string {
	input := []rune(s)
	li := len(input)
	ret := make([]rune, li)
	for i, r := range input {
		ret[li-i-1] = r
	}
	return string(ret)
}

//goland:noinspection GoUnusedFunction
func divCeil(num, div int) int {
	quot := num / div
	if num%div != 0 {
		quot++
	}
	return quot
}

//goland:noinspection GoUnusedFunction
func min(nums ...int) int {
	minimum := nums[0]
	for _, num := range nums {
		if num < minimum {
			minimum = num
		}
	}
	return minimum
}

//goland:noinspection GoUnusedFunction
func max(nums ...int) int {
	idx := nums[0]
	for i, num := range nums {
		if num > nums[idx] {
			idx = i
		}
	}

	return nums[idx]
}

//goland:noinspection GoUnusedFunction
func abs(num int) int {
	if num < 0 {
		return -num
	}
	return num
}

//goland:noinspection GoUnusedFunction
func isPrime(num int) bool {
	if num == 2 || num == 3 {
		return true
	}

	if num <= 1 || num%2 == 0 || num%3 == 0 {
		return false
	}

	for i := 5; i*i <= num; i += 6 {
		if num%i == 0 || num%(i+2) == 0 {
			return false
		}
	}

	return true
}

//goland:noinspection GoUnusedFunction
func gcd(a, b int) int {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

//goland:noinspection GoUnusedFunction
func lcm(a, b int) int {
	return abs(a) / gcd(a, b) * abs(b)
}

// Examples:
//	digitAt(1234, -1) -> panic!
//	digitAt(1234, 0) -> 4
//	digitAt(1234, 1) -> 3
//	digitAt(1234, 2) -> 2
//	digitAt(1234, 3) -> 1
//	digitAt(1234, 4) -> panic!
//goland:noinspection GoUnusedFunction
func digitAt(num, pos int) int {
	if num == 0 {
		return 0
	}

	num = abs(num)

	lenNum := int(math.Log10(float64(num))) + 1
	if pos < 0 || pos >= lenNum {
		err := fmt.Sprintf("Out of bound access for digit. Position passed %d, number %d", pos, num)
		panic(err)
	}

	rem := num % int(math.Pow10(pos+1))
	return rem / int(math.Pow10(pos))
}


To satisfy his love of matching socks, Phoenix has brought his $$$n$$$ socks ($$$n$$$ is even) to the sock store. Each of his socks has a color $$$c_i$$$ and is either a left sock or right sock. Phoenix can pay one dollar to the sock store to either:   recolor a sock to any color $$$c'$$$ $$$(1 \le c' \le n)$$$  turn a left sock into a right sock  turn a right sock into a left sock  The sock store may perform each of these changes any number of times. Note that the color of a left sock doesn't change when it turns into a right sock, and vice versa. A matching pair of socks is a left and right sock with the same color. What is the minimum cost for Phoenix to make $$$n/2$$$ matching pairs? Each sock must be included in exactly one matching pair.

The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 1000$$$) — the number of test cases. The first line of each test case contains three integers $$$n$$$, $$$l$$$, and $$$r$$$ ($$$2 \le n \le 2 \cdot 10^5$$$; $$$n$$$ is even; $$$0 \le l, r \le n$$$; $$$l+r=n$$$) — the total number of socks, and the number of left and right socks, respectively. The next line contains $$$n$$$ integers $$$c_i$$$ ($$$1 \le c_i \le n$$$) — the colors of the socks. The first $$$l$$$ socks are left socks, while the next $$$r$$$ socks are right socks. It is guaranteed that the sum of $$$n$$$ across all the test cases will not exceed $$$2 \cdot 10^5$$$.

For each test case, print one integer — the minimum cost for Phoenix to make $$$n/2$$$ matching pairs. Each sock must be included in exactly one matching pair.

NoteIn the first test case, Phoenix can pay $$$2$$$ dollars to:   recolor sock $$$1$$$ to color $$$2$$$  recolor sock $$$3$$$ to color $$$2$$$  There are now $$$3$$$ matching pairs. For example, pairs $$$(1, 4)$$$, $$$(2, 5)$$$, and $$$(3, 6)$$$ are matching.In the second test case, Phoenix can pay $$$3$$$ dollars to:   turn sock $$$6$$$ from a right sock to a left sock  recolor sock $$$3$$$ to color $$$1$$$  recolor sock $$$4$$$ to color $$$1$$$  There are now $$$3$$$ matching pairs. For example, pairs $$$(1, 3)$$$, $$$(2, 4)$$$, and $$$(5, 6)$$$ are matching.

package main

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

// github.com/EndlessCheng/codeforces-go
func CF1515D(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	abs := func(x int) int {
		if x < 0 {
			return -x
		}
		return x
	}

	var T, n, l, r, v int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n, &l, &r)
		c := make([]int, n+1)
		for i := 0; i < l; i++ {
			Fscan(in, &v)
			c[v]++
		}
		for i := 0; i < r; i++ {
			Fscan(in, &v)
			c[v]--
		}
		ans := 0
		for i := 1; i <= n; i++ {
			for l > r && c[i] > 1 { // 左袜子多，且有相同颜色，左变右，与自己匹配
				l -= 2
				c[i] -= 2
				ans++
			}
			for l < r && c[i] < -1 { // 右袜子多，且有相同颜色，右变左，与自己匹配
				r -= 2
				c[i] += 2
				ans++
			}
		}
		ans += abs(l-r) / 2 // 左变右或右变左
		left := 0
		for _, c := range c {
			left += abs(c) // 变完之后左右相同，变更颜色
		}
		Fprintln(out, ans+left/2) // 上面的每次变更都会配对一双袜子，所以要除以 2
	}
}

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

package main

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

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

	var T, n, l, r, v int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n, &l, &r)
		c := make([]int, n+1)
		for i := 0; i < l; i++ {
			Fscan(in, &v)
			c[v]++
		}
		for i := 0; i < r; i++ {
			Fscan(in, &v)
			c[v]--
		}
		ans := 0
		for i := 1; i <= n; i++ {
			for l > r && c[i] > 1 {
				l -= 2
				c[i] -= 2
				ans++
			}
			for l < r && c[i] < -1 {
				r -= 2
				c[i] += 2
				ans++
			}
		}
		left := abs(l - r)
		for _, c := range c {
			left += abs(c)
		}
		Fprintln(out, ans+left/2)
	}
}

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

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

package main

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

func main_gr_14_D() {
	_in, _out := os.Stdin, os.Stdout
	in, out := bufio.NewReader(_in), bufio.NewWriter(_out)
	defer out.Flush()
	var cas int = 1
	Fscan(in, &cas)
	var sol func()
	sol = func() {
		var n, l, r int
		Fscan(in, &n, &l, &r)
		left, right := map[int]int{}, map[int]int{}
		for i := 0; i < n; i++ {
			var val int
			Fscan(in, &val)
			if i < l {
				left[val]++
			} else {
				right[val]++
			}
		}
		for k, v := range left {
			var minCount int = int(1e9)
			if v < right[k] {
				minCount = v
			} else {
				minCount = right[k]
			}
			if minCount > 0 {
				left[k] -= minCount
				right[k] -= minCount
			}
		}
		var lcount, rcount int
		for _, v := range left {
			lcount += v
		}
		for _, v := range right {
			rcount += v
		}
		var ans = (lcount + rcount) / 2
		if lcount > rcount {
			moveCount := (lcount - rcount) / 2
			ans += moveCount
			for _, v := range left {
				moveCount -= v / 2
				if moveCount <= 0 {
					ans -= (moveCount + v/2)
					break
				} else {
					ans -= v / 2
				}
			}
		} else if rcount > lcount {
			moveCount := (rcount - lcount) / 2
			ans += moveCount
			for _, v := range right {
				moveCount -= v / 2
				if moveCount <= 0 {
					ans -= (moveCount + v/2)
					break
				} else {
					ans -= v / 2
				}
			}
		}
		Fprintln(out, ans)
	}
	for i := 0; i < cas; i++ {
		sol()
	}
}

func main() {
	main_gr_14_D()
}

package main

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

var in *bufio.Reader

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

func solve() {
	var n, l, r int
	fmt.Fscan(in, &n)
	fmt.Fscan(in, &l)
	fmt.Fscan(in, &r)

	lefts := make(map[int]int)
	for i := 0; i < l; i++ {
		var t int
		fmt.Fscan(in, &t)
		lefts[t]++
	}

	rights := make(map[int]int)
	for i := 0; i < r; i++ {
		var t int
		fmt.Fscan(in, &t)
		rights[t]++
	}

	// Assume that lefts >= rights
	if l < r {
		l, r = r, l
		lefts, rights = rights, lefts
	}

	// Matched without change
	for color, leftCount := range lefts {
		rightCount, ok := rights[color]
		if !ok {
			continue
		}
		remove := min(leftCount, rightCount)
		lefts[color] -= remove
		l -= remove
		r -= remove
	}

	// Matched with one change
	result := 0
	for _, leftCount := range lefts {
		extras := l - r
		move := min(leftCount/2, extras/2)
		leftCount -= move * 2
		l -= move * 2
		result += move
	}

	// Change direction and change color
	result += (l-r)/2 + (l+r)/2

	fmt.Println(result)
}

func main() {
	in = bufio.NewReader(os.Stdin)

	var t int
	fmt.Fscan(in, &t)

	for i := 0; i < t; i++ {
		solve()
	}
}

package main

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

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

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

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

	var nt int
	fmt.Fscanf(reader, "%d\n", &nt)
	for kk := 0; kk < nt; kk++ {
		var n, l, r int
		fmt.Fscanf(reader, "%d%d%d\n", &n, &l, &r)

		var left = make(map[int]int)
		var right = make(map[int]int)

		for i := 0; i < n; i++ {
			var c int
			fmt.Fscanf(reader, "%d", &c)
			if i < l {
				if right[c] > 0 {
					right[c]--
				} else {
					left[c]++
				}
			} else {
				if left[c] > 0 {
					left[c]--
				} else {
					right[c]++
				}
			}
		}

		fmt.Fscanf(reader, "\n")

		var cost = 0
		var totalLeft = 0
		var totalRight = 0

		for _, v := range left {
			totalLeft += v
		}

		for _, v := range right {
			totalRight += v
		}

		// need change
		var diff = abs(totalLeft, totalRight) / 2

		cost += diff

		var middle = (totalLeft + totalRight) / 2

		//fmt.Println("middle", middle, "cost", cost)

		if totalRight < totalLeft {
			// change left -> right
			for k, v := range left {
				var ex = min(v / 2, diff)
				diff -= ex
				left[k] = v - ex
				middle -= ex
			}

		} else {
			// change right -> left
			for k, v := range right {
				var ex = min(v / 2, diff)
				diff -= ex
				right[k] = v - ex
				middle -= ex
			}

		}

		cost += middle

		fmt.Fprintf(writer, "%d\n", cost)
	}
}


One day Alice was cleaning up her basement when she noticed something very curious: an infinite set of wooden pieces! Each piece was made of five square tiles, with four tiles adjacent to the fifth center tile:    By the pieces lay a large square wooden board. The board is divided into $$$n^2$$$ cells arranged into $$$n$$$ rows and $$$n$$$ columns. Some of the cells are already occupied by single tiles stuck to it. The remaining cells are free.Alice started wondering whether she could fill the board completely using the pieces she had found. Of course, each piece has to cover exactly five distinct cells of the board, no two pieces can overlap and every piece should fit in the board entirely, without some parts laying outside the board borders. The board however was too large for Alice to do the tiling by hand. Can you help determine if it's possible to fully tile the board?

The first line of the input contains a single integer $$$n$$$ ($$$3 \leq n \leq 50$$$) — the size of the board. The following $$$n$$$ lines describe the board. The $$$i$$$-th line ($$$1 \leq i \leq n$$$) contains a single string of length $$$n$$$. Its $$$j$$$-th character ($$$1 \leq j \leq n$$$) is equal to "." if the cell in the $$$i$$$-th row and the $$$j$$$-th column is free; it is equal to "#" if it's occupied. You can assume that the board contains at least one free cell.

Output YES if the board can be tiled by Alice's pieces, or NO otherwise. You can print each letter in any case (upper or lower).

NoteThe following sketches show the example boards and their tilings if such tilings exist:

package main

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

func main() {
	var s int
	var err error
	reader := bufio.NewReaderSize(os.Stdin, 1024*1024)

	st := strings.Split(readLine(reader), " ")

	s, err = strconv.Atoi(st[0])
	if err != nil {
		panic(err)
	}

	var b [50][50]string

	// var t []string
	for line := 0; line < s; line++ {
		arTemp := string(readLine(reader))

		for arItr := 0; arItr < s; arItr++ {
			//t = append(t, string(arTemp[arItr]))
			b[line][arItr] = string(arTemp[arItr])
		}

	}

	for line := 0; line < s; line++ {
		for col := 0; col < s; col++ {
			if b[line][col] == "." {
				if line+2 < s && col-1 >= 0 && col+1 < s && b[line+1][col-1] == "." && b[line+1][col] == "." && b[line+1][col+1] == "." && b[line+2][col] == "." {
					b[line][col], b[line+1][col-1], b[line+1][col], b[line+1][col+1], b[line+2][col] = "#", "#", "#", "#", "#"
				} else {
					fmt.Print("NO")
					return
				}
			}
		}
	}
	fmt.Print("YES")
}

func readLine(reader *bufio.Reader) string {
	str, _, err := reader.ReadLine()
	if err == io.EOF {
		return ""
	}

	return strings.TrimRight(string(str), "\r\n")
}

// Author: sighduck
// URL: https://codeforces.com/contest/1150/problem/B

package main

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

type Cell struct {
	X int
	Y int
}

func getPieceCells(i int, j int) []Cell {
	return []Cell{
		{X: i, Y: j},
		{X: i + 1, Y: j - 1},
		{X: i + 1, Y: j},
		{X: i + 1, Y: j + 1},
		{X: i + 2, Y: j},
	}
}

func isLegal(n int, i int, j int, cells [][]bool) bool {
	for _, cell := range getPieceCells(i, j) {
		if !(0 <= cell.X && cell.X < n) || !(0 <= cell.Y && cell.Y < n) || cells[cell.X][cell.Y] {
			return false
		}
	}
	return true
}

func Solve(n int, board []string) string {
	cells := make([][]bool, n)
	for i := 0; i < n; i++ {
		cells[i] = make([]bool, n)
		for j := 0; j < n; j++ {
			if string(board[i][j]) == "#" {
				cells[i][j] = true
			} else {
				cells[i][j] = false
			}
		}
	}
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if !cells[i][j] && isLegal(n, i, j, cells) {
				for _, cell := range getPieceCells(i, j) {
					cells[cell.X][cell.Y] = true
				}
			} else if !cells[i][j] {
				return "NO"
			}
		}
	}
	return "YES"
}

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

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

	fmt.Fprintf(writer, "%s\n", Solve(n, board))
}

package main

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

func main() {
	var s int
	var err error
	reader := bufio.NewReaderSize(os.Stdin, 1024*1024)

	st := strings.Split(readLine(reader), " ")

	s, err = strconv.Atoi(st[0])
	if err != nil {
		panic(err)
	}

	var b [50][50]string

	// var t []string
	for line := 0; line < s; line++ {
		arTemp := string(readLine(reader))

		for arItr := 0; arItr < s; arItr++ {
			//t = append(t, string(arTemp[arItr]))
			b[line][arItr] = string(arTemp[arItr])
			fmt.Println(b[line][arItr])
		}

	}

	for line := 0; line < s; line++ {
		for col := 0; col < s; col++ {
			fmt.Println(line, col)
			if b[line][col] == "." {
				if line+2 < s && col-1 >= 0 && col+1 < s && b[line+1][col-1] == "." && b[line+1][col] == "." && b[line+1][col+1] == "." && b[line+2][col] == "." {
					b[line][col], b[line+1][col-1], b[line+1][col], b[line+1][col+1], b[line+2][col] = "#", "#", "#", "#", "#"
				} else {
					fmt.Print("NO")
					return
				}
			}
		}
	}
	fmt.Print("YES")
}

func readLine(reader *bufio.Reader) string {
	str, _, err := reader.ReadLine()
	if err == io.EOF {
		return ""
	}

	return strings.TrimRight(string(str), "\r\n")
}

// Author: sighduck
// URL: https://codeforces.com/contest/1150/problem/B

package main

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

type Cell struct {
	X int
	Y int
}

func getPieceCells(i int, j int) []Cell {
	return []Cell{
		{X: i, Y: i},
		{X: i + 1, Y: j - 1},
		{X: i + 1, Y: j},
		{X: i + 1, Y: j + 1},
		{X: i + 2, Y: j},
	}
}

func isLegal(n int, i int, j int, cells [][]bool) bool {
	for _, cell := range getPieceCells(i, j) {
		if !(0 <= cell.X && cell.X < n) || !(0 <= cell.Y && cell.Y < n) || cells[i][j] {
			return false
		}
	}
	return true
}

func Solve(n int, board []string) string {
	cells := make([][]bool, n)
	for i := 0; i < n; i++ {
		cells[i] = make([]bool, n)
		for j := 0; j < n; j++ {
			if string(board[i][j]) == "#" {
				cells[i][j] = true
			} else {
				cells[i][j] = false
			}
		}
	}
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if !cells[i][j] && isLegal(n, i, j, cells) {
				for _, cell := range getPieceCells(i, j) {
					cells[cell.X][cell.Y] = true
				}
			} else if !cells[i][j] {
				return "NO"
			}
		}
	}
	return "YES"
}

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

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

	fmt.Fprintf(writer, "%s\n", Solve(n, board))
}

// Author: sighduck
// URL: https://codeforces.com/contest/1150/problem/B

package main

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

type Cell struct {
	X int
	Y int
}

func getPieceCells(i int, j int) []Cell {
	return []Cell{
		{X: i, Y: j},
		{X: i + 1, Y: j - 1},
		{X: i + 1, Y: j},
		{X: i + 1, Y: j + 1},
		{X: i + 2, Y: j},
	}
}

func isLegal(n int, i int, j int, cells [][]bool) bool {
	for _, cell := range getPieceCells(i, j) {
		if !(0 <= cell.X && cell.X < n) || !(0 <= cell.Y && cell.Y < n) || cells[i][j] {
			return false
		}
	}
	return true
}

func Solve(n int, board []string) string {
	cells := make([][]bool, n)
	for i := 0; i < n; i++ {
		cells[i] = make([]bool, n)
		for j := 0; j < n; j++ {
			if string(board[i][j]) == "#" {
				cells[i][j] = true
			} else {
				cells[i][j] = false
			}
		}
	}
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if !cells[i][j] && isLegal(n, i, j, cells) {
				for _, cell := range getPieceCells(i, j) {
					cells[cell.X][cell.Y] = true
				}
			} else if !cells[i][j] {
				return "NO"
			}
		}
	}
	return "YES"
}

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

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

	fmt.Fprintf(writer, "%s\n", Solve(n, board))
}