package main

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

// github.com/EndlessCheng/codeforces-go
func CF1263D(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	fa := [26]byte{}
	for i := range fa {
		fa[i] = byte(i)
	}
	var find func(byte) byte
	find = func(x byte) byte {
		if fa[x] != x {
			fa[x] = find(fa[x])
		}
		return fa[x]
	}
	merge := func(from, to byte) { fa[find(from)] = find(to) }

	var n, cnt int
	var s []byte
	shown := [26]bool{}
	for Fscan(in, &n); n > 0; n-- {
		Fscan(in, &s)
		h := s[0] - 'a'
		shown[h] = true
		for _, b := range s[1:] {
			merge(b-'a', h)
		}
	}
	for i, b := range shown {
		if b && find(byte(i)) == byte(i) {
			cnt++
		}
	}
	Fprint(_w, cnt)
}

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

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
}

/*********** DP sub-functions ***********/

// ChMin accepts a pointer of integer and a target value.
// If target value is SMALLER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMin(updatedValue *int, target int) bool {
	if *updatedValue > target {
		*updatedValue = target
		return true
	}
	return false
}

// ChMax accepts a pointer of integer and a target value.
// If target value is LARGER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMax(updatedValue *int, target int) bool {
	if *updatedValue < target {
		*updatedValue = target
		return true
	}
	return false
}

// NthBit returns nth bit value of an argument.
// n starts from 0.
func NthBit(num, nth int) int {
	return num >> uint(nth) & 1
}

// OnBit returns the integer that has nth ON bit.
// If an argument has nth ON bit, OnBit returns the argument.
func OnBit(num, nth int) int {
	return num | (1 << uint(nth))
}

// OffBit returns the integer that has nth OFF bit.
// If an argument has nth OFF bit, OffBit returns the argument.
func OffBit(num, nth int) int {
	return num & ^(1 << uint(nth))
}

// PopCount returns the number of ON bit of an argument.
func PopCount(num int) int {
	res := 0

	for i := 0; i < 70; i++ {
		if ((num >> uint(i)) & 1) == 1 {
			res++
		}
	}

	return res
}

/*********** Arithmetic ***********/

// Max returns the max integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Max(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m < integer {
			m = integer
		}
	}
	return m
}

// Min returns the min integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Min(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m > integer {
			m = integer
		}
	}
	return m
}

// Sum returns multiple integers sum.
func Sum(integers ...int) int {
	s := 0

	for _, i := range integers {
		s += i
	}

	return s
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int) int {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

// AbsInt is integer version of math.Abs
func AbsInt(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

// Gcd returns the Greatest Common Divisor of two natural numbers.
// Gcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Gcd uses the Euclidean Algorithm.
func Gcd(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}
	if a < b {
		a, b = b, a
	}

	// Euclidean Algorithm
	for b > 0 {
		div := a % b
		a, b = b, div
	}

	return a
}

// Lcm returns the Least Common Multiple of two natural numbers.
// Lcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Lcd uses the Euclidean Algorithm indirectly.
func Lcm(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}

	// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2
	// a' and b' are relatively prime numbers
	// gcd consists of prime numbers, that are included in a and b
	gcd := Gcd(a, b)

	// not (a * b / gcd), because of reducing a probability of overflow
	return (a / gcd) * b
}

// 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)
}

/********** 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 int
var S [][]rune

var memo [30][]int

func main() {
	n = ReadInt()
	S = make([][]rune, n)
	for i := 0; i < n; i++ {
		S[i] = ReadRuneSlice()
	}

	for i := 0; i < n; i++ {
		for _, r := range S[i] {
			tmp := r - 'a'
			memo[tmp] = append(memo[tmp], i)
		}
	}

	uf := NewUnionFind(n)

	for i := 0; i < ALPHABET_NUM; i++ {
		if len(memo[i]) == 0 {
			continue
		}

		top := memo[i][0]
		for j := 1; j < len(memo[i]); j++ {
			uf.Unite(top, memo[i][j])
		}
	}

	fmt.Println(uf.CcNum())
}

// UnionFind provides disjoint set algorithm.
// It accepts both 0-based and 1-based setting.
type UnionFind struct {
	parents []int
}

// NewUnionFind returns a pointer of a new instance of UnionFind.
func NewUnionFind(n int) *UnionFind {
	uf := new(UnionFind)
	uf.parents = make([]int, n)

	for i := 0; i < n; i++ {
		uf.parents[i] = -1
	}

	return uf
}

// Root method returns root node of an argument node.
// Root method is a recursive function.
func (uf *UnionFind) Root(x int) int {
	if uf.parents[x] < 0 {
		return x
	}

	// route compression
	uf.parents[x] = uf.Root(uf.parents[x])
	return uf.parents[x]
}

// Unite method merges a set including x and a set including y.
func (uf *UnionFind) Unite(x, y int) bool {
	xp := uf.Root(x)
	yp := uf.Root(y)

	if xp == yp {
		return false
	}

	// merge: xp -> yp
	// merge larger set to smaller set
	if uf.CcSize(xp) > uf.CcSize(yp) {
		xp, yp = yp, xp
	}
	// update set size
	uf.parents[yp] += uf.parents[xp]
	// finally, merge
	uf.parents[xp] = yp

	return true
}

// Same method returns whether x is in the set including y or not.
func (uf *UnionFind) Same(x, y int) bool {
	return uf.Root(x) == uf.Root(y)
}

// CcSize method returns the size of a set including an argument node.
func (uf *UnionFind) CcSize(x int) int {
	return -uf.parents[uf.Root(x)]
}

// CcNum method returns the number of connected components.
// Time complextity is O(n)
func (uf *UnionFind) CcNum() int {
	res := 0
	for i := 0; i < len(uf.parents); i++ {
		if uf.parents[i] < 0 {
			res++
		}
	}
	return res
}

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

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

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
}

/*********** DP sub-functions ***********/

// ChMin accepts a pointer of integer and a target value.
// If target value is SMALLER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMin(updatedValue *int, target int) bool {
	if *updatedValue > target {
		*updatedValue = target
		return true
	}
	return false
}

// ChMax accepts a pointer of integer and a target value.
// If target value is LARGER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMax(updatedValue *int, target int) bool {
	if *updatedValue < target {
		*updatedValue = target
		return true
	}
	return false
}

// NthBit returns nth bit value of an argument.
// n starts from 0.
func NthBit(num, nth int) int {
	return num >> uint(nth) & 1
}

// OnBit returns the integer that has nth ON bit.
// If an argument has nth ON bit, OnBit returns the argument.
func OnBit(num, nth int) int {
	return num | (1 << uint(nth))
}

// OffBit returns the integer that has nth OFF bit.
// If an argument has nth OFF bit, OffBit returns the argument.
func OffBit(num, nth int) int {
	return num & ^(1 << uint(nth))
}

// PopCount returns the number of ON bit of an argument.
func PopCount(num int) int {
	res := 0

	for i := 0; i < 70; i++ {
		if ((num >> uint(i)) & 1) == 1 {
			res++
		}
	}

	return res
}

/*********** Arithmetic ***********/

// Max returns the max integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Max(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m < integer {
			m = integer
		}
	}
	return m
}

// Min returns the min integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Min(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m > integer {
			m = integer
		}
	}
	return m
}

// Sum returns multiple integers sum.
func Sum(integers ...int) int {
	s := 0

	for _, i := range integers {
		s += i
	}

	return s
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int) int {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

// AbsInt is integer version of math.Abs
func AbsInt(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

// Gcd returns the Greatest Common Divisor of two natural numbers.
// Gcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Gcd uses the Euclidean Algorithm.
func Gcd(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}
	if a < b {
		a, b = b, a
	}

	// Euclidean Algorithm
	for b > 0 {
		div := a % b
		a, b = b, div
	}

	return a
}

// Lcm returns the Least Common Multiple of two natural numbers.
// Lcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Lcd uses the Euclidean Algorithm indirectly.
func Lcm(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}

	// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2
	// a' and b' are relatively prime numbers
	// gcd consists of prime numbers, that are included in a and b
	gcd := Gcd(a, b)

	// not (a * b / gcd), because of reducing a probability of overflow
	return (a / gcd) * b
}

// 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)
}

/********** 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 int
var S [][]rune

var memo [30][]int

func main() {
	n = ReadInt()
	S = make([][]rune, n)
	for i := 0; i < n; i++ {
		S[i] = ReadRuneSlice()
	}

	for i := 0; i < n; i++ {
		for _, r := range S[i] {
			tmp := r - 'a'
			memo[tmp] = append(memo[tmp], i)
		}
	}

	uf := NewUnionFind(n)

	for i := 0; i < ALPHABET_NUM; i++ {
		if len(memo[i]) == 0 {
			continue
		}

		top := memo[i][0]
		for j := 1; j < len(memo[i]); j++ {
			uf.Unite(top, memo[i][j])
		}
	}

	fmt.Println(uf.CcNum())
}

// 0-based
// uf := NewUnionFind(n)
// uf.Root(x) 			// Get root node of the node x
// uf.Unite(x, y) 	// Unite node x and node y
// uf.Same(x, y) 		// Judge x and y are in the same connected component.
// uf.CcSize(x) 		// Get size of the connected component including node x
// uf.CcNum() 			// Get number of connected components

// UnionFind provides disjoint set algorithm.
// Node id starts from 0 (0-based setting).
type UnionFind struct {
	parents []int
}

// NewUnionFind returns a pointer of a new instance of UnionFind.
func NewUnionFind(n int) *UnionFind {
	uf := new(UnionFind)
	uf.parents = make([]int, n)

	for i := 0; i < n; i++ {
		uf.parents[i] = -1
	}

	return uf
}

// Root method returns root node of an argument node.
// Root method is a recursive function.
func (uf *UnionFind) Root(x int) int {
	if uf.parents[x] < 0 {
		return x
	}

	// route compression
	uf.parents[x] = uf.Root(uf.parents[x])
	return uf.parents[x]
}

// Unite method merges a set including x and a set including y.
func (uf *UnionFind) Unite(x, y int) bool {
	xp := uf.Root(x)
	yp := uf.Root(y)

	if xp == yp {
		return false
	}

	// merge: xp -> yp
	// merge larger set to smaller set
	if uf.CcSize(xp) > uf.CcSize(yp) {
		xp, yp = yp, xp
	}
	// update set size
	uf.parents[yp] += uf.parents[xp]
	// finally, merge
	uf.parents[xp] = yp

	return true
}

// Same method returns whether x is in the set including y or not.
func (uf *UnionFind) Same(x, y int) bool {
	return uf.Root(x) == uf.Root(y)
}

// CcSize method returns the size of a set including an argument node.
func (uf *UnionFind) CcSize(x int) int {
	return -uf.parents[uf.Root(x)]
}

// CcNum method returns the number of connected components.
// Time complextity is O(n)
func (uf *UnionFind) CcNum() int {
	res := 0
	for i := 0; i < len(uf.parents); i++ {
		if uf.parents[i] < 0 {
			res++
		}
	}
	return res
}

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

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

package main

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

const N = 200002

var n int
var lab [N]int
var last [33] int
var s string
var picked [33] bool

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

func union(r1, r2 int) {
	var x = lab[r1] + lab[r2]
	if lab[r1] < lab[r2] {
		lab[r1] = x
		lab[r2] = r1
	} else {
		lab[r2] = x
		lab[r1] = r2
	}
}

func get(x int) int {
	if lab[x] < 0 {
		return x
	}
	lab[x] = get(lab[x])
	return lab[x]
}

func main() {
	defer writer.Flush()

	fmt.Fscanf(reader, "%d\n", &n)

	for i:=0; i < n; i++ {
		lab[i] = -1
	}

	for i:=0; i < 26; i++ {
		last[i] = -1
	}

	for i:=0; i < n; i++ {
		fmt.Fscanf(reader, "%s\n", &s)
		for j:=0; j < 26; j++ {
			picked[j] = false
		}

		var sz = len(s)
		for j:=0; j < sz; j++ {
			var pos = s[j] - 'a'
			if !picked[pos] {
				if last[pos] == -1 {
					last[pos] = i
				} else {
					var r1= get(last[pos])
					var r2= get(i)
					if r1 != r2 {
						union(r1, r2)
					}
				}
				picked[pos] = true
			}
		}
	}

	var unique_group = make(map[int] bool)
	for i:=0; i < n; i++ {
		unique_group[get(i)] = true
	}
	var tot = len(unique_group)
	fmt.Fprintf(writer, "%d\n", tot)
}

package main

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

const N = 200002

var n int
var lab [N]int
var last [33] int
var s string
var picked [33] bool

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 union(r1, r2 int) {
	var x = lab[r1] + lab[r2]
	if lab[r1] < lab[r2] {
		lab[r1] = x
		lab[r2] = r1
	} else {
		lab[r2] = x
		lab[r1] = r2
	}
}

func get(x int) int {
	if lab[x] < 0 {
		return x
	}
	lab[x] = get(lab[x])
	return lab[x]
}

func main() {

	scanf("%d\n", &n)
	for i:=0; i < n; i++ {
		lab[i] = -1
	}

	for i:=0; i < 26; i++ {
		last[i] = -1
	}

	for i:=0; i < n; i++ {
		scanf("%s\n", &s)
		for j:=0; j < 26; j++ {
			picked[j] = false
		}

		var sz = len(s)
		for j:=0; j < sz; j++ {
			var pos = s[j] - 'a'
			if !picked[pos] {
				if last[pos] == -1 {
					last[pos] = i
				} else {
					var r1= get(last[pos])
					var r2= get(i)
					if r1 != r2 {
						union(r1, r2)
					}
				}
				picked[pos] = true
			}
		}
	}

	var unique_group = make(map[int] bool)
	for i:=0; i < n; i++ {
		unique_group[get(i)] = true
	}
	var tot = len(unique_group)
	fmt.Println(tot)
}

package main

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

type HSet map[rune]struct{}

func CreateHSetFromString(str string) HSet {
	s := make(HSet, 30)

	for _, r := range str {
		s[r] = struct{}{}
	}

	return s
}

func (s *HSet) HasIntersection(a HSet) bool {

	if len(*s) < len(a) {
		for k := range *s {
			if _, ok := a[k]; ok {
				return true
			}
		}
	} else {
		for k := range a {
			if _, ok := (*s)[k]; ok {
				return true
			}
		}
	}

	return false
}

func (s *HSet) Merge(a HSet) {
	for k := range a {
		(*s)[k] = struct{}{}
	}
}

type SliceHSet []HSet

func (r *SliceHSet) Optimize() {
	skip := map[int]struct{}{}

	for {
		for i := 0; i < len(*r)-1; i++ {
			for j := i + 1; j < len(*r); j++ {
				if (*r)[j].HasIntersection((*r)[i]) {
					skip[i] = struct{}{}
					(*r)[j].Merge((*r)[i])
					(*r)[i].Merge((*r)[j])
				}
			}
		}

		if len(skip) == 0 {
			break
		}

		tmp := make([]HSet, 0, len(*r)-len(skip))

		for i := range *r {
			if _, needSkip := skip[i]; needSkip {
				continue
			}

			tmp = append(tmp, (*r)[i])
		}

		*r = tmp

		for i := range skip {
			delete(skip, i)
		}
	}
}
func main() {
	var rows int
	in := bufio.NewReader(os.Stdin)

	fmt.Fscanln(in, &rows)

	e := make(map[rune]HSet, 30)

	scanner := bufio.NewScanner(in)
	for i := 0; i < rows; i++ {
		scanner.Scan()
		s := scanner.Text()
		h := CreateHSetFromString(s)
		k := rune(s[0])
		if v, ok := e[k]; ok {
			v.Merge(h)
		} else {
			e[k] = h
		}
	}

	r := make(SliceHSet, 0, len(e))
	for _, v := range e {
		r = append(r, v)
	}

	r.Optimize()

	fmt.Fprintln(os.Stdout, len(r))
}

package main

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

type Node struct {
	neighs []string
}

var m map[string]*Node
var st map[string]bool

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 dfs(curr string, m map[string]*Node) {

	_, ok := st[curr]
	if ok {
		return
	}

	st[curr] = true
	for _, neigh := range m[curr].neighs {
		dfs(neigh, m)
	}
}

func main() {
	defer writer.Flush()
	m = make(map[string]*Node)
	st = make(map[string]bool)
	var ls []string
	var n int
	scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		var input string
		scanf("%s\n", &input)

		ls = append(ls, input)
		_, inside := m[input]
		if !inside {
			m[input] = &Node{}
		}

		for _, c := range input {
			target := string(c)
			_, inside := m[target]
			if !inside {
				m[target] = &Node{}
			}

			m[input].neighs = append(m[input].neighs, target)
			m[target].neighs = append(m[target].neighs, input)
		}
	}

	ans := 0
	for _, inp := range ls {
		_, inside := st[inp]
		if !inside {
			dfs(inp, m)
			ans += 1
		}
	}

	printf("%d\n", ans)

}

package main

import "fmt"

type Node struct {
	neighs []string
}

var m map[string]*Node
var st map[string]bool

func dfs(curr string, m map[string]*Node) {

	_, ok := st[curr]
	if ok {
		return
	}

	st[curr] = true
	for _, neigh := range m[curr].neighs {
		dfs(neigh, m)
	}
}

func main() {
	m = make(map[string]*Node)
	st = make(map[string]bool)
	var ls []string
	var n int
	fmt.Scanf("%d", &n)
	for i := 0; i < n; i++ {
		var input string
		fmt.Scanf("%s", &input)

		ls = append(ls, input)
		_, ok := m[input]
		if !ok {
			m[input] = &Node{}
		}

		for _, c := range input {
			target := string(c)
			_, ok := m[target]
			if !ok {
				m[target] = &Node{}
			}

			m[input].neighs = append(m[input].neighs, target)
			m[target].neighs = append(m[target].neighs, input)
		}
	}

	ans := 0
	for _, inp := range ls {
		_, inside := st[inp]
		if !inside {
			dfs(inp, m)
			ans += 1
		}
	}

	fmt.Println(ans)

}

package main

import "fmt"

type Node struct {
	neighs []string
}

var m map[string]*Node
var st map[string]bool

func dfs(curr string, m map[string]*Node) {

	_, ok := st[curr]
	if ok {
		return
	}

	st[curr] = true
	for _, neigh := range m[curr].neighs {
		dfs(neigh, m)
	}
}

func main() {
	m = make(map[string]*Node)
	st = make(map[string]bool)
	var ls []string
	var n int
	fmt.Scanf("%d", &n)
	for i := 0; i < n; i++ {
		var input string
		fmt.Scanf("%s\n", &input)

		ls = append(ls, input)
		_, ok := m[input]
		if !ok {
			m[input] = &Node{}
		}

		for _, c := range input {
			target := string(c)
			_, ok := m[target]
			if !ok {
				m[target] = &Node{}
			}

			m[input].neighs = append(m[input].neighs, target)
			m[target].neighs = append(m[target].neighs, input)
		}
	}

	ans := 0
	for _, inp := range ls {
		_, inside := st[inp]
		if !inside {
			dfs(inp, m)
			ans += 1
		}
	}

	fmt.Println(ans)

}

package main

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

const N = 200002

var n int
var lab [N]int
var last [33] int
var s string
var picked [33] bool

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 union(r1, r2 int) {
	var x = lab[r1] + lab[r2]
	if lab[r1] < lab[r2] {
		lab[r1] = x
		lab[r2] = r1
	} else {
		lab[r2] = x
		lab[r1] = r2
	}
}

func get(x int) int {
	if lab[x] < 0 {
		return x
	}
	lab[x] = get(lab[x])
	return lab[x]
}

func main() {

	scanf("%d\n", &n)
	for i:=0; i < n; i++ {
		lab[i] = -1
	}

	for i:=0; i < 26; i++ {
		last[i] = -1
	}

	for i:=0; i < n; i++ {
		scanf("%s\n", &s)
		for j:=0; j < 26; j++ {
			picked[j] = false
		}

		var sz = len(s)
		for j:=0; j < sz; j++ {
			var pos = s[j] - 'a'
			if !picked[pos] {
				if last[pos] == -1 {
					last[pos] = i
				} else {

						var r1= get(last[pos])
						var r2= get(i)
						if r1 != r2 {
							union(r1, r2)
						}

				}
				picked[pos] = true
			}
		}
	}

	var unique_group = make(map[int] bool)
	for i:=0; i < n; i++ {
		unique_group[get(i)] = true
	}
	print(len(unique_group))
}

package main

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

const N = 200002

var n int
var lab [N]int
var last [33] int
var s string
var picked [33] bool

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 union(r1, r2 int) {
	var x = lab[r1] + lab[r2]
	if lab[r1] < lab[r2] {
		lab[r1] = x
		lab[r2] = r1
	} else {
		lab[r2] = x
		lab[r1] = r2
	}
}

func get(x int) int {
	if lab[x] < 0 {
		return x
	}
	lab[x] = get(lab[x])
	return lab[x]
}

func main() {

	scanf("%d\n", &n)
	for i:=0; i < n; i++ {
		lab[i] = -1
	}

	for i:=0; i < 26; i++ {
		last[i] = -1
	}

	for i:=0; i < n; i++ {
		scanf("%s\n", &s)
		for j:=0; j < 26; j++ {
			picked[j] = false
		}

		var sz = len(s)
		for j:=0; j < sz; j++ {
			var pos = s[j] - 'a'
			if !picked[pos] {
				if last[pos] == -1 {
					last[pos] = i
				} else {
					if n < 200000 {
						var r1= get(last[pos])
						var r2= get(i)
						if r1 != r2 {
							union(r1, r2)
						}
					}
				}
				picked[pos] = true
			}
		}
	}

	var unique_group = make(map[int] bool)
	for i:=0; i < n; i++ {
		unique_group[get(i)] = true
	}
	var tot = len(unique_group)
	fmt.Println(tot)
}

package main

import (
	"fmt"
	"os"
)

const N = 200002

var n int
var lab [N]int
var gr [33][] int // array of slice
var s string
var picked [33] bool

func union(r1, r2 int) {
	var x = lab[r1] + lab[r2]
	if lab[r1] < lab[r2] {
		lab[r1] = x
		lab[r2] = r1
	} else {
		lab[r2] = x
		lab[r1] = r2
	}
}

func get(x int) int {
	if lab[x] < 0 {
		return x
	}
	lab[x] = get(lab[x])
	return lab[x]
}

func main() {
	fmt.Fscanln(os.Stdin, &n)
	for i:=0; i < n; i++ {
		lab[i] = -1
	}

	for i:=0; i < 26; i++ {
		gr[i] = make([]int, 0)
	}

	for i:=0; i < n; i++ {
		fmt.Fscanln(os.Stdin, &s)
		for j:=0; j < 26; j++ {
			picked[i] = false
		}

		var sz = len(s)
		for j:=0; j < sz; j++ {
			var pos = s[j] - 'a'
			if !picked[pos] {
				gr[pos] = append(gr[pos], i)
				picked[pos] = true
			}
		}
	}

	for i:=0; i < 26; i++ {
		var sz = len(gr[i])
		for j:=0; j < sz - 1; j++ {
			var r1 = get(gr[i][j])
			var r2 = get(gr[i][j + 1])
			if r1 != r2 {
				union(r1, r2)
			}
		}
	}

	var unique_group = make(map[int] bool)
	for i:=0; i < n; i++ {
		unique_group[get(i)] = true
	}

	fmt.Println(len(unique_group))
}

package main

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

const N = 200002

var n int
var lab [N]int
var last [33] int
var s string
var picked [33] bool

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 union(r1, r2 int) {
	var x = lab[r1] + lab[r2]
	if lab[r1] < lab[r2] {
		lab[r1] = x
		lab[r2] = r1
	} else {
		lab[r2] = x
		lab[r1] = r2
	}
}

func get(x int) int {
	if lab[x] < 0 {
		return x
	}
	lab[x] = get(lab[x])
	return lab[x]
}

func main() {

	scanf("%d", &n)
	for i:=0; i < n; i++ {
		lab[i] = -1
	}

	for i:=0; i < 26; i++ {
		last[i] = -1
	}

	for i:=0; i < n; i++ {
		scanf("%s", &s)
		for j:=0; j < 26; j++ {
			picked[j] = false
		}

		var sz = len(s)
		for j:=0; j < sz; j++ {
			var pos = s[j] - 'a'
			if !picked[pos] {
				if last[pos] == -1 {
					last[pos] = i
				} else {
					if n < 200000 {
						var r1= get(last[pos])
						var r2= get(i)
						if r1 != r2 {
							union(r1, r2)
						}
					}
				}
				picked[pos] = true
			}
		}
	}

	var unique_group = make(map[int] bool)
	for i:=0; i < n; i++ {
		unique_group[get(i)] = true
	}

	printf("%d", len(unique_group))
}

package main

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

const N = 200002

var n int
var lab [N]int
var last [33] int
var s string
var picked [33] bool

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

func union(r1, r2 int) {
	var x = lab[r1] + lab[r2]
	if lab[r1] < lab[r2] {
		lab[r1] = x
		lab[r2] = r1
	} else {
		lab[r2] = x
		lab[r1] = r2
	}
}

func get(x int) int {
	if lab[x] < 0 {
		return x
	}
	lab[x] = get(lab[x])
	return lab[x]
}

func main() {

	fmt.Fscanf(reader, "%d\n", &n)

	for i:=0; i < n; i++ {
		lab[i] = -1
	}

	for i:=0; i < 26; i++ {
		last[i] = -1
	}

	for i:=0; i < n; i++ {
		fmt.Fscanf(reader, "%s\n", &s)
		for j:=0; j < 26; j++ {
			picked[j] = false
		}

		var sz = len(s)
		for j:=0; j < sz; j++ {
			var pos = s[j] - 'a'
			if !picked[pos] {
				if last[pos] == -1 {
					last[pos] = i
				} else {
					var r1= get(last[pos])
					var r2= get(i)
					if r1 != r2 {
						union(r1, r2)
					}
				}
				picked[pos] = true
			}
		}
	}

	var unique_group = make(map[int] bool)
	for i:=0; i < n; i++ {
		unique_group[get(i)] = true
	}
	var tot = len(unique_group)
	fmt.Fprintf(writer, "%d\n", tot)
}


package main

import (
	"fmt"
)

func main() {
	var n int
	var s string

	fmt.Scan(&n)

	m := make([][]bool, n)

	for i := range m {
		m[i] = make([]bool, n)
	}

	for i:=0; i<n; i++ {
		fmt.Scan(&s)
		for j, v := range s {
			if v == '#' {
				m[i][j] = true
			} else {
				m[i][j] = false
			}
		}
	}

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

func check(m [][]bool) bool {
	length := len(m)

	for i := range m {
		for j := range m[i] {
			if m[i][j] == true {
				if i+1>=length || i+2>=length || j-1<0 || j+1>=length {
					// fmt.Println(i, j, "1")
					return false
				}
				if !m[i+1][j] || !m[i+1][j-1] || !m[i+1][j+1] || !m[i+2][j] {
					// fmt.Println(i, j)
					return false
				}
				m[i+1][j] = false
				m[i+1][j-1] = false
				m[i+1][j+1] = false
				m[i+2][j] = false
			}
		}
	}
	return true
}

package main

import "fmt"

func main() {
    var n int
    var s [105]string
    var f [105][105]bool
    fmt.Scan(&n)
    cnt := 0
    for i := 0; i < n; i++ {
        fmt.Scan(&s[i])
        for j, v := range s[i] {
            if v == '#' {
                cnt++
                f[i][j] = true
            }
        }
    }
    for i := 1; i < (n-1); i++ {
        for j := 1; j < (n-1); j++ {
            if f[i][j] {
                if f[i-1][j] && f[i+1][j] && f[i][j-1] && f[i][j+1] {
                    cnt -= 5
                    f[i][j] = false; f[i-1][j] = false; f[i+1][j] = false; f[i][j-1] = false; f[i][j+1] = false
                }
            }
        }
    }
    if cnt == 0 { 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()
	n := 0
	fmt.Fscanf(in, "%d\n", &n)
	a := make([][]int, n)
	for i := 0; i < n; i++ {
		a[i] = make([]int, n)
	}
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if a[i][j] == 0 {
				dfs(n, i, j, a, 1)
			}
		}
	}
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if a[i][j] == 1 {
				fmt.Fprintf(out, "B")
			} else {
				fmt.Fprintf(out, "W")
			}
		}
		fmt.Fprintf(out, "\n")
	}
	return
}

func dfs(n, x, y int, a [][]int, color int) {
	dx := []int{-1, 1, 2, 2, 1, -1, -2, -2}
	dy := []int{-2, -2, -1, 1, 2, 2, 1, -1}
	newcolor := 3 - color
	for q := 0; q < 8; q++ {
		nx := x + dx[q]
		ny := y + dy[q]
		if nx >= 0 && nx < n && ny >= 0 && ny < n {
			if a[nx][ny] == 0 {
				a[nx][ny] = color
				dfs(n, nx, ny, a, newcolor)
			}
		}
	}
}

package main

import (
	"fmt"
)

func main() {
    var n int
    fmt.Scan(&n)
    for i:=0;i<n;i++{
        for j:=0;j<n;j++{
            if i%2==j%2{
                fmt.Print("B")
            }else{
                fmt.Print("W")
            }
        }
        fmt.Println()
    }

}

/*            {{range .Games}}
if ({{.Id}}===id) {
    infoEl.html("{{.White}} vs. {{.Black}}\n added by {{.AddedUser}}")
    game.load_pgn({{.Pgn}})

    toBegin()
    toEnd()

    ext_pgn = game.pgn()
    updateBoard(board,false)
}
{{end}}*/

package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"math/big"
	"os"
	"strconv"
)

var scan *bufio.Scanner
var reader io.Reader
var writer io.Writer

func init() {
	scan = bufio.NewScanner(os.Stdin)
	reader = os.Stdin
	writer = os.Stdout
	scan.Split(bufio.ScanWords)
}

func main() {
	solve()
}

func solve() {
	n := nextInt()
	w := "W"
	b := "B"
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if (i+j)%2 == 0 {
				fmt.Fprint(writer, w)
			} else {
				fmt.Fprint(writer, b)
			}
		}
		fmt.Fprintln(writer)
	}
}

func nextWord() string {
	var s string
	fmt.Fscan(reader, &s)
	return s
}

func nextInt() int {
	i, e := strconv.Atoi(nextWord())
	if e != nil {
		panic(e)
	}
	return i
}

func max(x int, y ...int) int {
	res := float64(x)
	for _, z := range y {
		res = math.Max(res, float64(z))
	}
	return int(res)
}

func min(x int, y ...int) int {
	res := float64(x)
	for _, z := range y {
		res = math.Min(res, float64(z))
	}
	return int(res)
}

func abs(x int) int {
	return int(math.Abs(float64(x)))
}

func sqrt(x int) int {
	return int(math.Sqrt(float64(x)))
}

func int2Int(x int) big.Int {
	var res big.Int
	res.SetInt64(int64(x))
	return res
}

package main

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

func main() {
	input := bufio.NewReader(os.Stdin)
	var (
		n int
	)
	_, _ = fmt.Fscan(input, &n)

	needW := true
	for i := 0; i < n; i++ {
		first := needW
		for j := 0; j < n; j++ {
			if needW {
				fmt.Print("W")
			} else {
				fmt.Print("B")
			}
			needW = !needW
		}
		if first == needW {
			needW = !needW
		}
		fmt.Println()
	}
}

package main

import (
	"fmt"
)

type pos struct {
	color    rune
	row, col int
}

func solve(n int) [][]rune {
	const B = 'B'
	const W = 'W'

	res := make([][]rune, n)
	for i := range res {
		res[i] = make([]rune, n)
	}

	for i := 0; i < n*n; i++ {
		r, c := i/n, i%n

		res[r][c] = B
		if r%2 == c%2 {
			res[r][c] = W
		}
	}

	return res
}

func main() {
	var n int

	fmt.Scan(&n)

	res := solve(n)
	for _, s := range res {
		fmt.Println(string(s))
	}
}

package main

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

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

	var x int
	_, err := fmt.Fscan(input, &x)
	if err != nil {
	}

	for i := 0; i < x; i++ {
		for j := 0; j < x; j++ {
			if (i+j)%2 == 0 {
				fmt.Print("W")
			} else {
				fmt.Print("B")
			}
		}
		fmt.Print("\n")
	}
}

package main

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

var scan *bufio.Scanner
var writer io.Writer

func init() {
	scan = bufio.NewScanner(os.Stdin)
	writer = os.Stdout
	scan.Split(bufio.ScanWords)
}

func nextWord() string {
	scan.Scan()
	str := scan.Text()
	return str
}

func nextInt() int {
	i, e := strconv.Atoi(nextWord())
	if e != nil {
		panic(e)
	}
	return i
}

func main() {
	n := nextInt()
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if i % 2 == 0 {
				if j % 2 == 0 {
					fmt.Fprint(writer, "W")
				} else {
					fmt.Fprint(writer, "B")
				}
			} else {
				if j % 2 == 1 {
					fmt.Fprint(writer, "W")
				} else {
					fmt.Fprint(writer, "B")
				}
			}
		}
		fmt.Fprintln(writer)
	}
}

package main

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

const INF  = 1000000001

type Pair struct {
	first, second int
}

func sort(arr []int) []int {
	if len(arr) < 2 {
		return arr
	}
	left := 0
	right := len(arr) - 1
	pivot := rand.Int() % len(arr)

	arr[pivot], arr[right] = arr[right], arr[pivot]

	for i := 0; i < len(arr); i++ {
		if arr[i] < arr[right] {
			arr[i], arr[left] = arr[left], arr[i]
			left++
		}
	}

	arr[left], arr[right] = arr[right], arr[left]

	sort(arr[:left])
	sort(arr[left+1:])
	return arr
}

func solution(reader io.Reader, writer io.Writer) {
	var n int
	fmt.Fscanf(reader, "%d\n", &n)
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if (i + j) % 2 == 0 {
				fmt.Fprintf(writer, "W")
			} else {
				fmt.Fprintf(writer, "B")
			}
		}
		fmt.Fprintf(writer, "\n")
	}
}

func main() {

	//stdin, err := os.Open("file.in")
	//if err != nil {
	//	panic(err)
	//}
	//defer stdin.Close()
	stdin := os.Stdin
	reader := bufio.NewReaderSize(stdin, 1024*1024)

	//stdout, err := os.Create("file.out")
	//if err != nil {
	//	panic(err)
	//}
	//defer stdout.Close()
	stdout := os.Stdout
	writer := bufio.NewWriterSize(stdout, 1024*1024)
	defer writer.Flush()

	solution(reader, writer)
}

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

package main

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

func createWhiteLine(n int) string {
	s := strings.Repeat("WB", n/2)
	if n%2 == 1 {
		return s + "W"
	}
	return s
}

func createBlackLine(n int) string {
	s := strings.Repeat("BW", n/2)
	if n%2 == 1 {
		return s + "B"
	}
	return s
}

func Solve(n int) []string {
	board := make([]string, n)
	for i := 0; i < n; i++ {
		if i%2 == 0 {
			board[i] = createWhiteLine(n)
		} else {
			board[i] = createBlackLine(n)
		}
	}
	return board
}

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

	var n int
	fmt.Fscanf(reader, "%d\n", &n)

	for _, line := range Solve(n) {
		fmt.Fprintf(writer, "%s\n", line)
	}
}

package main

import (
	"fmt"
)

type pos struct {
	color    rune
	row, col int
}

func solve(n int) [][]rune {
	const empty = rune('!')

	ch := 'W'
	flipColor := func(ch rune) rune {
		if ch == 'W' {
			return 'B'
		}

		return 'W'
	}

	res := make([][]rune, n)
	for i := range res {
		res[i] = make([]rune, n)
		for j := range res[i] {
			res[i][j] = empty
		}
	}

	bfs := func(color rune, r, c int) {
		moves := []int{1, 2, 1, -2, -1, 2, -1, -2, 2, 1, 2, -1, -2, 1, -2, -1}

		q := []pos{{color, r, c}}

		for len(q) > 0 {
			next := q[0]
			q = q[1:]

			if res[next.row][next.col] != empty {
				break
			}
			res[next.row][next.col] = next.color

			for i := 0; i < len(moves); i += 2 {

				row := next.row + moves[i]
				col := next.col + moves[i+1]

				if row < 0 || col < 0 || row >= n || col >= n || res[row][col] != empty {
					continue
				}

				q = append(q, pos{flipColor(next.color), row, col})
			}
		}
	}

	for i := 0; i < n*n; i++ {
		r, c := i/n, i%n

		bfs(ch, r, c)

		ch = flipColor(ch)
	}

	return res
}

func main() {
	var n int

	fmt.Scan(&n)

	res := solve(n)
	for _, s := range res {
		fmt.Println(string(s))
	}
}


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 l, r, k int64
		fmt.Fscan(in, &l, &r, &k)

		if r-l == 0 {
			if l > 1 {
				fmt.Fprintln(out, "YES")
			} else {
				fmt.Fprintln(out, "NO")
			}
		} else {
			var o, e int64
			if l%2 == 0 && r%2 == 0 {
				o = (r - l) / 2
				e = o + 1
			} else if l%2 == 1 && r%2 == 1 {
				e = (r - l) / 2
				o = e + 1
			} else {
				e = ((r - l) / 2) + 1
				o = e
			}

			if o-k > 0 {
				fmt.Fprintln(out, "NO")
			} else {
				fmt.Fprintln(out, "YES")
			}
		}
	}
}

package main

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

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

func scan(a ...interface{})             { fmt.Fscan(in, a...) }
func printf(f string, a ...interface{}) { fmt.Fprintf(out, f, a...) }

func main() {
	defer out.Flush()
	var t int;
	scan(&t);
	for i := 0; i < t; i++ {
		var l, r, k int;
		scan(&l, &r, &k);
		x := r - l + 1;
		if x == 1 {
			if l > 1 {
				printf("YES\n")
			} else {
				printf("NO\n")
			}
			continue;
		}
		var e int;
		if x % 2 == 0 {
			if l % 2 == 0 {
				e = x / 2;
			} else {
				e = (x + 1) / 2;
			}
		} else {
			if l % 2 == 0 {
				e = (x + 1) / 2;
			} else {
				e = x / 2;
			}
		}
		if x - e > k {
			printf("NO\n")
		} else {
			printf("YES\n")
		}
	}
}

package main

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

var (
	in = bufio.NewReader(os.Stdin);
	t, l, r, k int
)

func main() {
	fmt.Fscan(in, &t);
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &l, &r, &k);
		x := r - l + 1;
		if x == 1 {
			if l > 1 {
				fmt.Println("YES")
			} else {
				fmt.Println("NO")
			}
			continue;
		}
		var e int;
		if x % 2 == 0 {
			if l % 2 == 0 {
				e = x / 2;
			} else {
				e = (x + 1) / 2;
			}
		} else {
			if l % 2 == 0 {
				e = (x + 1) / 2;
			} else {
				e = x / 2;
			}
		}
		if x - e > k {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
	}
}

// generated by 1e9y at 22-01-2022
// template version: 2022-01-11

package main

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

func gcd(x, y uint64) uint64 {
	for y != 0 {
		x, y = y, x%y
	}
	return x
}

// 0000.A
func solve(l, r, k uint64) bool {
	if l == r {
		return l != 1
	}

	evens := r - l
	if l%2 == 0 {
		evens++
	}

	pairs := (r - l + 1) / 2
	// if (r-l+1)%2 == 1 {
	pairs++
	// }

	if l%2 == 0 || r%2 == 0 {
		return pairs-1 <= k
	} else {
		return pairs <= k
	}
}

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

	t := ReadInt(in)
	for i := 0; i < t; i++ {
		slice := ReadUint64Slice(in)
		l, r, k := slice[0], slice[1], slice[2]
		Output(solve(l, r, k))
	}
}

// helpers for convenient input reading

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

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

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

func ReadIntSlice(in *bufio.Reader) []int {
	parts := ReadLineParts(in)
	slice := make([]int, len(parts))
	for i, n := range parts {
		slice[i] = MustAtoi(n)
	}
	return slice
}

func ReadInt64Slice(in *bufio.Reader) []int64 {
	parts := ReadLineParts(in)
	slice := make([]int64, len(parts))
	for i, n := range parts {
		slice[i] = MustParseInt(n, 10, 64)
	}
	return slice
}

func ReadUint64Slice(in *bufio.Reader) []uint64 {
	parts := ReadLineParts(in)
	slice := make([]uint64, len(parts))
	for i, n := range parts {
		slice[i] = MustParseUint(n, 10, 64)
	}
	return slice
}

func MustAtoi(s string) int {
	v, _ := strconv.Atoi(s)
	return v
}

func MustParseInt(s string, base, bitSize int) int64 {
	v, _ := strconv.ParseInt(s, base, bitSize)
	return v
}

func MustParseUint(s string, base, bitSize int) uint64 {
	v, _ := strconv.ParseUint(s, base, bitSize)
	return v
}

func SkipLine(in *bufio.Reader) {
	_, _ = in.ReadString('\n')
}

// helper for convenient answer output

func Output(v interface{}) {
	switch v.(type) {
	case bool:
		if v == true {
			Println("YES")
		} else {
			Println("NO")
		}
	default:
		Println(v)
	}
}

package main
import(
    "fmt"
    "bufio"
    "os"
)
func main() {
	in:= bufio.NewReader(os.Stdin)
	out:= bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t int
	fmt.Fscan(in,&t)
	for i:=0;i<t;i++{
		var a,b,c int
		fmt.Fscan(in,&a,&b,&c)
		if c == 0 && a==b && a>1 {
			fmt.Fprintln(out,"YES")
			continue
		}
		if number_of_odds_inclusive(a,b) <= c {
			fmt.Fprintln(out,"YES")
		} else{
			fmt.Fprintln(out,"NO")
		}
	}
}
func number_of_odds_inclusive(l,u int) int {
	if l%2 != 0 && u%2 != 0 {
		return ((u-l)/2-1)+2
	}
	if l%2 != 0 || u%2 != 0 {
		return ((u-l)/2)+1
	}
	return ((u-l)/2)
}

package main

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

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

func main() {
	defer out.Flush()
	var t, l, r, k int
	for fmt.Fscan(in, &t); t > 0; t-- {
		fmt.Fscan(in, &l, &r, &k)
		if l == r && l != 1 || k >= (r+1)/2-l/2 {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}
	}
}

package main

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

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

func (in *CF1629B) 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 *CF1629B) load() {
	if len(in.split) <= in.index {
		in.split = strings.Split(in.GetLine(), in.separator)
		in.index = 0
	}
}

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

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

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

/**
Run solve the problem CF1629B
Date: 8/03/22
User: pepradere
URL: https://codeforces.com/problemset/problem/1629/B
Problem: CF1629B
**/
func (in *CF1629B) Run() {
	for t := in.NextInt(); t > 0; t-- {
		l, r, k := in.NextInt(), in.NextInt(), in.NextInt()

		total := r - (l - 1)
		even := int(math.Ceil((float64(r) - (float64(l) - 1.)) / 2.))
		x := l%2 != 0
		y := r%2 != 0
		if x && y {
			even--
		}

		odd := total - even

		if (even > 0 && odd <= k) || (total == 1 && r != 1 && l != 1) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}

	}

}

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

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

package main

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

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

	for test := parseInt(getString(reader)); test > 0; test-- {
		lrk := getIntln(reader)
		l, r, k := lrk[0], lrk[1], lrk[2]
		if l == r {
			if l == 1 {
				writer.WriteString("NO\n")
			} else {
				writer.WriteString("YES\n")
			}
		} else {
			if l%2 == 1 && r%2 == 1 {
				if k >= (r-l+2)/2 {
					writer.WriteString("YES\n")
				} else {
					writer.WriteString("NO\n")
				}
			} else {
				if k >= (r-l+1)/2 {
					writer.WriteString("YES\n")
				} else {
					writer.WriteString("NO\n")
				}
			}
		}
	}
	writer.Flush()
}

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

func parseInt(str string) int {
	var res int
	size := len(str)
	for i := 0; i < size; i++ {
		digit := int(str[i] - '0')
		for j := (i + 1); j < size; j++ {
			digit = digit<<3 + digit<<1
		}
		res += digit
	}
	return res
}

func getIntln(in *bufio.Reader) []int {
	b := strings.Split(getString(in), " ")
	res := make([]int, len(b))
	for k, v := range b {
		res[k] = parseInt(v)
	}
	return res
}

package main

import (
	"fmt"
	"os"
	"bufio"
)
var (
	reader = bufio.NewReader(os.Stdin)
	writer = bufio.NewWriter(os.Stdout)
)
func scan(a ...interface{})    { fmt.Fscan(reader, a...) }

func test(){
	var l, r, k int
	scan(&l, &r, &k)
	if r==l{
		if r==1{
			fmt.Println("NO")
		}else{
			fmt.Println("YES")
		}
		return
	}
	need := (r - l) / 2
	if (l % 2)==1 || (r % 2)==1{
		need++
	}
	if need <= k{
		fmt.Println("YES")
	}else{
		fmt.Println("NO")
	}

}

func main() {
	var cases int
	cases = 0
	fmt.Scanf("%d\n", &cases)
	for i := 0; i < cases; i++ {
		test()
	}
}

package main

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

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

func scan(a ...interface{})             { fmt.Fscan(reader, a...) }
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }

func redirectInputToFile(r *bufio.Reader, fp string) {
	f, err := os.Open(fp)
	if err != nil {
		panic(err)
	}
	r.Reset(f)
}

func main() {
	defer writer.Flush()
// 	redirectInputToFile(reader, "input.txt")

	T := 1
	scan(&T)
	for t := 0; t < T; t++ {
		solve()
	}
}

func solve() {
	var l, r, k int
	scan(&l, &r, &k)
	if r-l+1 == 1 {
		if l == 1 {
			printf("NO\n")
		} else {
			printf("YES\n")
		}
		return
	}
	var div2 = r/2 - (l-1)/2
	if (r-l+1)-div2 <= k {
		printf("YES\n")
	} else {
		printf("NO\n")
	}
}

package main

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

//-----------------------------------------------

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

func scan(a ...interface{})    { fmt.Fscan(reader, a...) }
func print(a ...interface{})   { fmt.Fprint(writer, a...) }
func println(a ...interface{}) { fmt.Fprintln(writer, a...) }

//-----------------------------------------------

func main() {
	defer writer.Flush()
	var t, l, r, k int
	scan(&t)
	for i := 0; i < t; i++ {
		scan(&l, &r, &k)
		if r == l {
			if r == 1 {
				println("NO")
			} else {
				println("YES")
			}
		} else {
			c := r - l + 1
			oc := c / 2
			if (c&1) == 1 && (l&1) == 1 {
				oc++
			}
			if k >= oc {
				println("YES")
			} else {
				println("NO")
			}
		}
	}
}

package main

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

/*
4
1 5 3
1 5 2
10 15 2
10 14 2
---
YES [1 2 3 4 5] -> [2 60]
NO [2 4 15]
NO [10 11 12 13 14 15]
YES [10 11 12 13 14]

1
1 5 2

1
10 14 2

1
13 13 0
*/

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

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

	for ; t > 0; t-- {
		var l, r, k int
		scanf("%d %d %d\n", &l, &r, &k)

		if l == r && l != 1 && k == 0 {
			fmt.Fprintln(writer, "YES")
			continue
		}

		cnt := r - l + 1
		divBy2Cnt := cnt / 2
		if l%2 == 0 {
			divBy2Cnt = (cnt + 1) / 2
		}

		leftCnt := cnt - k
		if divBy2Cnt >= leftCnt {
			fmt.Fprintln(writer, "YES")
		} else {
			fmt.Fprintln(writer, "NO")
		}
	}
}

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 min(x, y int) int {
	if x < y {
		return x
	}
	return y
}

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

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

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

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

	for i := 5; i*i <= n; i += 6 {
		if n%i == 0 || n%(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"
	"os"
)

var yes = "YES"
var no = "NO"

func solve(l int, r int, k int) string {
	if r-l == 0 {
		if l == 1 {
			return no
		}
		return yes
	}
	n := r - l + 1
	o := n / 2
	if n%2 == 1 && l%2 == 1 {
		o++
	}
	if k >= o {
		return yes
	}
	return no
}

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

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

	for t := 0; t < T; t++ {
		var l int
		var r int
		var k int
		fmt.Fscan(in, &l)
		fmt.Fscan(in, &r)
		fmt.Fscan(in, &k)
		fmt.Fprintln(out, solve(l, r, k))
	}
	out.Flush()
}

package main

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

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

func scan(a ...interface{})             { fmt.Fscan(in, a...) }
func printf(f string, a ...interface{}) { fmt.Fprintf(out, f, a...) }

func main() {
	defer out.Flush()

	var ntc int
	scan(&ntc)
	for t := 0; t < ntc; t++ {
		var l, r, k int
		scan(&l, &r, &k)

		if l == r && l == 1 {
			printf("NO\n")
			continue
		}
		if l == r {
			printf("YES\n")
			continue
		}
		var even = (r - l + 1) / 2
		if (r-l+1)%2 == 1 && l%2 == 0 {
			even++
		}
		var needed = (r - l + 1) - even
		// printf("%d %d %d: needed = %d, k = %d\n", l, r, k, needed, k)
		if needed <= k {
			printf("YES\n")
		} else {
			printf("NO\n")
		}
	}
}

package main

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

func main() {
	input := bufio.NewReader(os.Stdin)
	t := readInt(input)

	for ; t > 0; t-- {
		nums := readArrInt(input)
		x := nums[0]
		y := nums[1]
		k := nums[2]

		if x == y && x > 1 {
			fmt.Println("YES")
		} else {
			if (y - x + 1 + x%2)/2 > k {
				fmt.Println("NO")
			} else {
				fmt.Println("YES")
			}
		}
	}
}

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 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
}

package main

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

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

func main() {
	var test int

	fmt.Scan(&test)

	for test != 0 {
		var l,r,k int
		fmt.Fscan(in,&l,&r,&k)
		var odd_num int= (r-l+1)/2
		if l%2 > 0 && r%2 > 0{
			odd_num ++
		}
		if (l==r){
			if (r==1){
				fmt.Println("NO")
			}else{
				fmt.Println("YES")
			}
		}else if odd_num > k || (l==r && r==1){
			fmt.Println("NO")
		}else{
			fmt.Println("YES")
		}
		test --
	}
}

package main

import "fmt"

func main() {
	var t int
	fmt.Scanf("%d", &t)

	for ; t > 0; t-- {
		var x, y, k int
		fmt.Scanf("%d %d %d\n", &x, y, k)
		if x == y && x > 1 {
			fmt.Println("YES")
		} else {
			if (y - x + 1 + x%2)/2 > k {
				fmt.Println("NO")
			} else {
				fmt.Println("YES")
			}
		}
	}
}

package main

import "fmt"

func main() {
	var tcc int
	fmt.Scanf("%d",&tcc)

	for i := 0; i < tcc; i++ {
		var l, r, k int
		fmt.Scanf("%d %d %d", &l, &r, &k)

		if l == r {
			if l == 1 {
				fmt.Println("NO")
			} else {
				fmt.Println("YES")
			}
		} else {
			var temp int
			if l%2 == 0 && r%2 == 0 {
				temp = (r - l + 1)/2
			} else {
				temp = (r - l + 1)/2 + 1
			}

			if temp <= k {
				fmt.Println("YES")
			} else {
				fmt.Println("NO")
			}
		}
	}
}

package main

import "fmt"

func main() {
	var t int
	fmt.Scanf("%d", &t)
	for ; t > 0; t-- {
		var x, y, k int
		fmt.Scanf("%d %d %d", &x, &y, &k)
		if x == y && x > 1 {
			fmt.Println("YES")
		} else {
			if (y - x + 1 + x%2)/2 > k {
				fmt.Println("NO")
			} else {
				fmt.Println("YES")
			}
		}
	}
}

package main

import "fmt"

func main() {
	var test int

	fmt.Scan(&test)

	for test != 0 {
		var l,r,k int
		fmt.Scanf("%d %d %d",&l,&r,&k)
		fmt.Println(l,r,k)
		odd_num := (r-l+1)/2
		if l%2 > 0 && r%2 > 0{
			odd_num ++
		}
		if (l==r){
			if (r==1){
				fmt.Println("NO")
			}else{
				fmt.Println("khacci")
				fmt.Println("YES")
			}
		}else if odd_num > k || (l==r && r==1){
			fmt.Println("NO")
		}else{
			fmt.Println("YES")
		}
		test --
	}
}

package main

import "fmt"

func main() {
	var test int

	fmt.Scan(&test)

	for test != 0 {
		var l,r,k int
		fmt.Scanf("%d %d %d",&l,&r,&k)
		odd_num := (r-l+1)/2
		if l%2 > 0 && r%2 > 0{
			odd_num ++
		}
		if (l==r){
			if (r==1){
				fmt.Println("NO")
			}else{
				fmt.Println("khacci")
				fmt.Println("YES")
			}
		}else if odd_num > k || (l==r && r==1){
			fmt.Println("NO")
		}else{
			fmt.Println("YES")
		}
		test --
	}
}

package main

import "fmt"

func main() {
	var test int

	fmt.Scan(&test)

	for test != 0 {
		var l,r,k int
		fmt.Scanf("%d %d %d",&l,&r,&k)
		odd_num := (r-l+1)/2
		if l%2 > 0 && r%2 > 0{
			odd_num ++
		}
		if (l==r){
			if (r==1){
				fmt.Println("NO")
			}else{
				fmt.Println("YES")
			}
		}else if odd_num > k || (l==r && r==1){
			fmt.Println("NO")
		}else{
			fmt.Println("YES")
		}
		test --
	}
}

package main

import "fmt"

func main() {
	var test int

	fmt.Scan(&test)

	for test != 0 {
		var l,r,k int
		fmt.Scanf("%d%d%d",&l,&r,&k)
		odd_num := (r-l+1)/2
		if l%2 > 0 && r%2 > 0{
			odd_num ++
		}
		if (l==r){
			if (r==1){
				fmt.Println("NO")
			}else{
				fmt.Println("YES")
			}
		}else if odd_num > k || (l==r && r==1){
			fmt.Println("NO")
		}else{
			fmt.Println("YES")
		}
		test --
	}
}

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 l, r, k int64
		fmt.Fscan(in, &l, &r, &k)

		if r-l == 0 {
			if l > 1 {
				fmt.Fprintln(out, "YES")
			} else {
				fmt.Fprintln(out, "NO")
			}
		} else {
			var o, e int64
			if l%2 == 0 && r%2 == 0 {
				o = (r - l) / 2
				e = o + 1
			} else if l%2 == 1 && r%2 == 1 {
				e = (r - l) / 2
				o = e + 1
			} else {
				e = (r - l) / 2
				o = e
			}

			if o-k > 0 {
				fmt.Fprintln(out, "NO")
			} else {
				fmt.Fprintln(out, "YES")
			}
		}
	}
}

package main

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

func countPrimes(l, r int64) int64 {
	// Return if less than 1
	// Get the sqrt of the limit
	sqrtLimit := int64(math.Sqrt(float64(r)))

	// Create array
	numbers := make([]bool, r)

	// Set 1 to prime
	numbers[0] = true
	numPrimes := int64(0)

	// Count the number of olds
	if r%2 == 0 {
		numPrimes = r / 2
	} else {
		numPrimes = (r + 1) / 2
	}

	// Loop through odd numbers
	for i := int64(3); i <= sqrtLimit; i += 2 {
		if !numbers[i] {
			for j := i * i; j < r; j += i * 2 {
				if !numbers[j] {
					numbers[j] = true
					numPrimes -= 1
				}
			}
		}
	}

	return numPrimes
}

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 l, r, k int64
		fmt.Fscan(in, &l, &r, &k)

		if r-l == 0 {
			if l > 1 {
				fmt.Fprintln(out, "YES")
			} else {
				fmt.Fprintln(out, "NO")
			}
		} else {
			c := countPrimes(l, r)
			if c-k > 0 {
				fmt.Fprintln(out, "NO")
			} else {
				fmt.Fprintln(out, "YES")
			}
		}
	}
}

package main

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

var (
	in = bufio.NewReader(os.Stdin);
	t, l, r, k int
)

func main() {
	fmt.Fscan(in, &t);
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &l, &r, &k);
		x := r - l + 1;
		if x == 1 {
			fmt.Println("YES")
			continue;
		}
		var e int;
		if x % 2 == 0 {
			if l % 2 == 0 {
				e = x / 2;
			} else {
				e = (x + 1) / 2;
			}
		} else {
			if l % 2 == 0 {
				e = (x + 1) / 2;
			} else {
				e = x / 2;
			}
		}
		if x - e > k {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
	}
}

// generated by 1e9y at 22-01-2022
// template version: 2022-01-11

package main

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

func gcd(x, y uint64) uint64 {
	for y != 0 {
		x, y = y, x%y
	}
	return x
}

// 0000.A
func solve(l, r, k uint64) bool {
	if l == r {
		return l != 1
	}

	evens := r - l
	if l%2 == 0 {
		evens++
	}

	pairs := (r - l + 1) / 2
	// if (r-l+1)%2 == 1 {
	pairs++
	// }

	if l%2 == 0 {
		return pairs-1 <= k
	} else {
		return pairs <= k
	}
}

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

	t := ReadInt(in)
	for i := 0; i < t; i++ {
		slice := ReadUint64Slice(in)
		l, r, k := slice[0], slice[1], slice[2]
		Output(solve(l, r, k))
	}
}

// helpers for convenient input reading

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

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

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

func ReadIntSlice(in *bufio.Reader) []int {
	parts := ReadLineParts(in)
	slice := make([]int, len(parts))
	for i, n := range parts {
		slice[i] = MustAtoi(n)
	}
	return slice
}

func ReadInt64Slice(in *bufio.Reader) []int64 {
	parts := ReadLineParts(in)
	slice := make([]int64, len(parts))
	for i, n := range parts {
		slice[i] = MustParseInt(n, 10, 64)
	}
	return slice
}

func ReadUint64Slice(in *bufio.Reader) []uint64 {
	parts := ReadLineParts(in)
	slice := make([]uint64, len(parts))
	for i, n := range parts {
		slice[i] = MustParseUint(n, 10, 64)
	}
	return slice
}

func MustAtoi(s string) int {
	v, _ := strconv.Atoi(s)
	return v
}

func MustParseInt(s string, base, bitSize int) int64 {
	v, _ := strconv.ParseInt(s, base, bitSize)
	return v
}

func MustParseUint(s string, base, bitSize int) uint64 {
	v, _ := strconv.ParseUint(s, base, bitSize)
	return v
}

func SkipLine(in *bufio.Reader) {
	_, _ = in.ReadString('\n')
}

// helper for convenient answer output

func Output(v interface{}) {
	switch v.(type) {
	case bool:
		if v == true {
			Println("YES")
		} else {
			Println("NO")
		}
	default:
		Println(v)
	}
}

// generated by 1e9y at 22-01-2022
// template version: 2022-01-11

package main

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

func gcd(x, y uint64) uint64 {
	for y != 0 {
		x, y = y, x%y
	}
	return x
}

// 0000.A
func solve(l, r, k uint64) bool {
	if l == r {
		return l != 1
	}

	evens := r - l
	if l%2 == 0 {
		evens++
	}

	pairs := (r - l + 1) / 2
	if (r-l+1)%2 == 1 {
		pairs++
	}

	if l%2 == 0 {
		return pairs-1 <= k
	} else {
		return pairs <= k
	}
}

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

	t := ReadInt(in)
	for i := 0; i < t; i++ {
		slice := ReadUint64Slice(in)
		l, r, k := slice[0], slice[1], slice[2]
		Output(solve(l, r, k))
	}
}

// helpers for convenient input reading

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

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

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

func ReadIntSlice(in *bufio.Reader) []int {
	parts := ReadLineParts(in)
	slice := make([]int, len(parts))
	for i, n := range parts {
		slice[i] = MustAtoi(n)
	}
	return slice
}

func ReadInt64Slice(in *bufio.Reader) []int64 {
	parts := ReadLineParts(in)
	slice := make([]int64, len(parts))
	for i, n := range parts {
		slice[i] = MustParseInt(n, 10, 64)
	}
	return slice
}

func ReadUint64Slice(in *bufio.Reader) []uint64 {
	parts := ReadLineParts(in)
	slice := make([]uint64, len(parts))
	for i, n := range parts {
		slice[i] = MustParseUint(n, 10, 64)
	}
	return slice
}

func MustAtoi(s string) int {
	v, _ := strconv.Atoi(s)
	return v
}

func MustParseInt(s string, base, bitSize int) int64 {
	v, _ := strconv.ParseInt(s, base, bitSize)
	return v
}

func MustParseUint(s string, base, bitSize int) uint64 {
	v, _ := strconv.ParseUint(s, base, bitSize)
	return v
}

func SkipLine(in *bufio.Reader) {
	_, _ = in.ReadString('\n')
}

// helper for convenient answer output

func Output(v interface{}) {
	switch v.(type) {
	case bool:
		if v == true {
			Println("YES")
		} else {
			Println("NO")
		}
	default:
		Println(v)
	}
}


package main

import(
    "fmt"
)

func main(){
    var(
        n,m,f   int
        s       [][]byte
    )
    fmt.Scan(&n,&m)
    s = make([][]byte,n)
    for i:=0;i<n;i++{
        s[i]=make([]byte,m)
    }
    f=0
    for i:=0;i<n;i++{
        if i%2==0{
            for j:=0;j<m;j++{
                fmt.Print("#")
            }
        }else{
            if f==0{
                for j:=0;j<m-1;j++{
                    fmt.Print(".")
                }
                fmt.Print("#")
                f=1
            }else{
                fmt.Print("#")
                for j:=1;j<m;j++{
                    fmt.Print(".")
                }
                f=0
            }
        }
        fmt.Println()
    }
}

package main

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

var in *bufio.Scanner = bufio.NewScanner(os.Stdin)
var out *bufio.Writer = bufio.NewWriter(os.Stdout)

func main() {
	defer out.Flush()
	in.Split(bufio.ScanWords)

	n, m := nextInt(), nextInt()
	a, b := make([]byte, m), make([]byte, m)
	for i := 0; i < m; i++ {
		a[i] = '#'
		b[i] = '.'
	}
	b[m - 1] = '#'
	for i := 0; i < n; i++ {
		if i % 2 == 0 {
			fmt.Println(string(a))
		} else {
			fmt.Println(string(b))
			rev(b)
		}
	}

}

func rev(a []byte) {
	for i, j := 0, len(a) - 1; i <= j; {
		a[i], a[j] = a[j], a[i]
		i++
		j--
	}
}

func nextInt() int {
	in.Scan()
	res, _ := strconv.Atoi(in.Text())
	return res
}

package main

import (
	"fmt"
)

func main() {
	var n, m int
	fmt.Scan(&n, &m)
	for i := 0; i < n; i++ {
		b := make([]byte, m)
		for j := 0; j < m; j++ {
			if i%2 == 0 || (i%4 == 1 && j == m-1) || (i%4 == 3 && j == 0) {
				b[j] = '#'
			} else {
				b[j] = '.'
			}
		}
		fmt.Println(string(b))
	}
}

package main

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

func main() {
	var r, c int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &r, &c)
	s1 := strings.Repeat("#", c)
	s2 := strings.Repeat(".", c-1) + "#"
	s3 := "#" + strings.Repeat(".", c-1)
	toggle := true
	for i := 0; i < r; i++ {
		if i%2 == 0 {
			fmt.Println(s1)
		} else {
			if toggle {
				fmt.Println(s2)
			} else {
				fmt.Println(s3)
			}
			toggle = !toggle
		}
	}
}

package main

import "fmt"

func main() {
	var ny, nx int
	fmt.Scan(&ny, &nx)
	c0 := make([]byte, nx)
	c1 := make([]byte, nx)
	c3 := make([]byte, nx)
	for i := range c0 {
		c0[i] = '#'
		c1[i] = '.'
		c3[i] = '.'
	}
	c1[nx-1] = '#'
	c3[0] = '#'
	for y := 0; y < ny; y++ {
		switch y % 4 {
		case 1:
			fmt.Println(string(c1))
		case 3:
			fmt.Println(string(c3))
		default:
			fmt.Println(string(c0))
		}
	}
}

package main
import "fmt"

func main() {
	var (
		n, m int
		index int
	)
	fmt.Scanln(&n, &m)
	for i := 1; i <= n; i ++ {
		if i%2 == 1 {
			printOddLine(m, i == n)
		}else {
			printEven(index, m)
			index ++
		}
	}
}

func printOddLine(m int, flg bool){
	for i := 0; i < m; i ++ {
		fmt.Print("#")
	}
	if !flg{
		fmt.Println()
	}
}

func printEven(index, m int){
	if index%2 == 1 {
		fmt.Print("#")
	}
	for i := 1; i < m; i ++ {
		fmt.Print(".")
	}
	if index%2 == 0 {
		fmt.Print("#")
	}
	fmt.Println()
}

package main

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

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

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

	n, m := nextInt(), nextInt()
	left := false

	for i := 0; i < n; i++ {
		if i % 2 == 0 {
			println(strings.Repeat("#", m))
		} else {
			if left {
				printf("#%s\n", strings.Repeat(".", m-1))
				left = false
			} else {
				printf("%s#\n", strings.Repeat(".", m-1))
				left = true
			}
		}
	}
}

func scan(a ...interface{}) {
	fmt.Fscan(reader, a...)
}

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

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

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

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

func printf(format string, a ...interface{}) {
	fmt.Fprintf(writer, format, a...)
}

package main

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

var scanner *bufio.Scanner

func getI64() int64 {
  scanner.Scan()
  x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
  return x
}
func getI() int {
  return int(getI64())
}
func getF() float64 {
  scanner.Scan()
  x, _ := strconv.ParseFloat(scanner.Text(), 64)
  return x
}
func getS() string {
  scanner.Scan()
  return scanner.Text()
}

func main() {
  scanner = bufio.NewScanner(os.Stdin)
  scanner.Split(bufio.ScanWords)
  writer := bufio.NewWriter(os.Stdout)
  defer writer.Flush()

  n, m := getI(), getI()
  for i := 0; i < n; i++ {
    row := make([]byte, m)
    if i%2 == 0 {
      for j := 0; j < m; j++ {
        row[j] = '#'
      }
    } else {
      for j := 0; j < m; j++ {
        row[j] = '.'
      }
      if i%4 == 1 {
        row[m-1] = '#'
      } else {
        row[0] = '#'
      }
    }
    writer.WriteString(fmt.Sprintf("%s\n", string(row)))
  }
}

package main

import "fmt"

func main(){
	var n,m int
	fmt.Scan(&n)
	fmt.Scan(&m)
	for i := 1; i <=n; i++ {
		for j := 1; j <=m; j++ {
			if i%2!=0 {
				fmt.Print("#")
			}
            if i%2==0 {
				if i%4==0 {
					if j==1 {
						fmt.Print("#")
					}else{
						fmt.Print(".")
					}
				}else{
					if j==m {
						fmt.Print("#")
					}else{
						fmt.Print(".")
					}
				}
			}

		}
		fmt.Println()
	}
}

package main

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

func GetScanner() func(a ...*int) {
    scanner := bufio.NewScanner(os.Stdin)
    scanner.Split(bufio.ScanWords)

    ScanInts := func(a ...*int) {
        for i := 0; i < len(a); i++ {
            scanner.Scan()
            *(a[i]), _ = strconv.Atoi(scanner.Text())
        }
    }
    return ScanInts
}

func main() {
    var n, m int
    ScanInts := GetScanner()
    ScanInts(&n, &m)
    for i := 0; i < n; i++ {
        if i%2 == 0 {
            for j := 0; j < m; j++ {
                fmt.Print("#")
            }
            fmt.Println()
        } else {
            if i%4 == 1 {
                for j := 0; j < m-1; j++ {
                    fmt.Print(".")
                }
                fmt.Println("#")
            } else {
                fmt.Print("#")
                for j := 1; j < m; j++ {
                    fmt.Print(".")
                }
                fmt.Println()
            }
        }
    }
}

package main

import (
	"fmt"
)

func main() {
	var n, m int
	sharp := "##"
	point := ""
	fmt.Scanf("%d %d", &n, &m)
	for i := 0; i < m-2; i++ {
		sharp += "#"
		point += "."
	}
	for i := 0; i < n; i++ {
		if i%2 == 0 {
			fmt.Println(sharp)
		}
		if i%4 == 1 {
			fmt.Println("." + point + "#")
		}
		if i%4 == 3 {
			fmt.Println("#" + point + ".")
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	var n, m int
	fmt.Scanf("%d %d", &n, &m)
	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			if i%2 == 0 || (j == 0 && (i+1)%4 == 0) || (j == m-1 && (i+1)%4 == 2) {
				fmt.Print(string('#'))
			} else {
				fmt.Print(string('.'))
			}
		}
		fmt.Println()
	}
}

package main

import (
    "fmt"
)

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

    for i := 0; i < n; i++ {
        if i & 1 == 0 {
            for j := 0; j < m; j++ {
                fmt.Printf("#")
            }
            fmt.Println()
        } else {
            for j := 0; j < m; j++ {
                if i % 4 == 1 && j == m - 1 {
                    fmt.Printf("#")
                } else if i % 4 == 3 && j == 0 {
                    fmt.Printf("#")
                } else {
                    fmt.Printf(".")
                }
            }
            fmt.Println()
        }
    }
}

package main

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

func main() {
	reader := bufio.NewReaderSize(os.Stdin, 1024*1024)
	line := readLine(reader)
	var n, m int = 0, 0
	fmt.Sscanf(line, "%d %d", &n, &m)
	swap := true
	for i := 0; i < n; i++ {
		line := ""
		for j := 0; j < m; j++ {
			if i%2 != 0 {
				line += "."
			} else {
				line += "#"
			}
		}
		if i%2 != 0 {
			if swap {
				line = line[:m-1] + "#"
			} else {
				line = "#" + line[1:]
			}
			swap = !swap
		}
		fmt.Println(line)
	}
}

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

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

package main

import (
	"fmt"
)

func more(str string, count int)(res string){
	for i:= 0; i < count; i++{
		res += str;
	}
	return
}

func main() {
	var n, m int
	fmt.Scan(&n, &m)
	for i:=0; i < n; i++{
		if i%2 == 0 {
			fmt.Println(more("#",m))
		} else {
			if (i/2)%2 == 0 {
				fmt.Println(more(".",m-1)+"#")
			} else {
				fmt.Println("#"+more(".",m-1))
			}
		}
	}
}

package main

import "fmt"

func main() {
	c,r := 0 , 0
	fmt.Scan(&r , &c)
	k := true
	for i := 0; i < r; i++ {
		for j := 0; j < c; j++ {
			if i % 2 == 0 {
				fmt.Print("#")
			} else if k == true {
				if j == c - 1 {
					fmt.Print("#")
					k = false
				} else {
					fmt.Print(".")
				}
			} else {
				if j == 0 {
					fmt.Print("#")
				}else if j == c - 1 {
					fmt.Print(".")
					k = true
				} else {
					fmt.Print(".")
				}
			}
		}
		fmt.Println("")
	}
}

package main

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

const NewLine = '\r'

func readLine() string {
	reader := bufio.NewReader(os.Stdin)
	str, err := reader.ReadString(NewLine)
	if err != nil {
		fmt.Print(err)
		panic(err)
	}
	return strings.Replace(str, string(NewLine), "", -1)
}

func toInt(str string) int {
	i, err := strconv.Atoi(str)
	if err != nil {
		fmt.Print(err)
		panic(err)
	}
	return i
}

func readSnakeTable() (int, int) {
	line := readLine()
	arr := strings.Split(line, " ")

	return toInt(arr[0]), toInt(arr[1])
}

func snakeCells(n int) string {
	return strings.Repeat("#", n)
}

func snakeCell(n int, pos int) string {
	empty := strings.Repeat(".", n - 1)
	if  pos == 0 {
		return "#" + empty
	} else {
		return empty + "#"
	}
}

func main() {
	n, m := readSnakeTable()
	var state = 0
	for i := 0; i < n; i++ {
		switch state {
		case 0:
			fmt.Println(snakeCells(m))
		case 1:
			fmt.Println(snakeCell(m, 1))
		case 2:
			fmt.Println(snakeCells(m))
		case 3:
			fmt.Println(snakeCell(m, 0))
		}
		state = (state + 1) % 4
	}
}

package main

import (
	"fmt"
)

func main() {
	var rows, cols int
	fmt.Scanf("%d %d", &rows, &cols)

	grid := make([][]int, rows)

	var rlPadFlag bool

	for i := range(grid) {
		grid[i] = make([]int, cols)

		if i%2 == 1 {
			if !rlPadFlag {
				for j := 0; j < cols -1; j++ {
					grid[i][j] = 1
				}

				rlPadFlag = !rlPadFlag
			} else {
				for j := 1; j < cols; j++ {
					grid[i][j] = 1
				}

				rlPadFlag = !rlPadFlag
			}
		}
	}

	for _, row := range(grid) {
		for _, col := range(row) {
			switch col {
			case 1:
				fmt.Print(".")
				break
			default:
				fmt.Print("#")
			}
		}

		fmt.Println()
	}
}

package main

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

func main() {
	var n, m int

	scr := bufio.NewReader(os.Stdin)
	ocr := bufio.NewWriter(os.Stdout)

	fmt.Fscanln(scr, &n, &m)

	p :=""
	sh := "##"
	for i:=0; i<m-2; i++{
		sh +="#"
		p +="."
	}
	for i:=0; i<n; i++{
		switch true {
		case i % 2 == 0:
			fmt.Fprintln(ocr, sh)
			ocr.Flush()
		case i % 4 == 1:
			fmt.Fprintln(ocr, "." + p +  "#")
			ocr.Flush()
		case i % 4 == 3:
			fmt.Fprintln(ocr, "#" + p +  ".")
			ocr.Flush()
		}
	}

}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var n, m int
	fmt.Scan(&n, &m)

	hashFullStr := strings.Repeat("#", m)
	hashLeftStr := "#" + strings.Repeat(".", m-1)
	hashRightStr := strings.Repeat(".", m-1) + "#"

	states := []string{hashFullStr, hashRightStr, hashFullStr, hashLeftStr}
	for i := 0; i < n; i++ {
		fmt.Println(states[i%4])
	}
}

package main

import "fmt"

func main() {
	var n, m int
	fmt.Scan(&n, &m)

	for i := 1; i <= n; i++ {
		for j := 1; j <= m; j++ {
			if i%2 != 0 {
				fmt.Print("#")
			} else if j == 1 && i/2%2 == 0 {
				fmt.Print("#")
			} else if j == m && i/2%2 != 0 {
				fmt.Print("#")
			} else {
				fmt.Print(".")
			}
		}
		fmt.Println("")
	}
}

package main

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

var reader *bufio.Reader

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

var n, m int

func main() {
	fmt.Fscan(reader, &n, &m)
	for i := 0; i < n; i++ {
		if i%2 == 0 {
			for j := 0; j < m; j++ {
				fmt.Print("#")
			}
			fmt.Println()
		} else if i/2%2 == 0 {
			for j := 0; j < m-1; j++ {
				fmt.Print(".")
			}
			fmt.Print("#")
			fmt.Println()
		} else {
			fmt.Print("#")
			for j := 0; j < m-1; j++ {
				fmt.Print(".")
			}
			fmt.Println()
		}
	}
}

package main

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

func main() {
	var n, m, en uint8
	in := bufio.NewReader(os.Stdin)
	fmt.Fscanf(in, "%d %d\n", &n, &m)
	for i:=uint8(1); i <= n; i++{
		if i % 2 == 0{
			en++
			ee(en, m)
		}else{
			full(m)
		}
	}
}
func full(m uint8){
	for i:=uint8(0); i < m; i++{
		fmt.Print("#")
	}
	fmt.Println()
}
func ee(n uint8, m uint8){
	if(n % 2 != 0){
		for i:=uint8(0); i < m-1; i++{
			fmt.Print(".")
		}
		fmt.Print("#\n")
	}else{
		fmt.Print("#")
		for i:=uint8(0); i < m-1; i++{
			fmt.Print(".")
		}
		fmt.Println()
	}
}

package main

import (
	"fmt"
	"strings"
)

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

	for i := 1; i <= n; i++ {
		if i%4 == 0 {
			fmt.Println("#" + strings.Repeat(".", m-1))
		} else if i%2 == 0 {
			fmt.Println(strings.Repeat(".", m-1) + "#")
		} else {
			fmt.Println(strings.Repeat("#", m))
		}
	}
}

package main

import (
        "fmt"
)

func main() {
        var n, m int
        fmt.Scan(&n, &m)
        for i := 0; i < n; i++ {
                for j := 0; j < m; j++ {
                        if (j == 0 && i%2 == 1 && i%4 != 1) || (j == m - 1 && i%4 == 1) {
                                fmt.Printf("#")
                        } else {
                                if i%2 == 0 {
                                        fmt.Printf("#")
                                } else {
                                        fmt.Printf(".")
                                }
                        }
                }
                fmt.Printf("\n")
        }
}

package main

import (
	"fmt"
	"bufio"
	"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() {

	var a, b int
	scanf("%d %d \n", &a, &b)
	toggle := false // default from last
	for i:=1; i<=a; i++ {
		once := false
		for j:=1; j<=b; j++ {
			if i % 2 == 0  {
				if toggle == true && j == 1 && !once {
					fmt.Printf("%s", "#")
					toggle = false
					once = true
				}else if toggle == false && j == b  && !once{
					fmt.Printf("%s", "#")
					toggle = true
					once = true
				}else {
					fmt.Printf("%s", ".")
				}
			}else {
				fmt.Printf("%s", "#")
			}
		}
		fmt.Println()
	}

}

package main

import "fmt"

func main() {
	var n, m int
	var flag bool
	fmt.Scanf("%d %d", &n, &m)
	for i := 0; i < n; i++ {
		if i%2 == 0 {
			for j := 0; j < m; j++ {
				fmt.Printf("#")
			}
			fmt.Printf("\n")
		} else {
			if flag {
				fmt.Printf("#")
				for j := 1; j < m; j++ {
					fmt.Printf(".")
				}
				fmt.Printf("\n")
				flag = false
			} else {
				for j := 1; j < m; j++ {
					fmt.Printf(".")
				}
				fmt.Printf("#\n")
				flag = true
			}
		}
	}
}

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)
    n := nextInt()
    m := nextInt()
    a := "#"
    b := ""
    for i := 0; i < m - 1; i++ {
        a += "#"
        b += "."
    }
    l := "#" + b
    r := b + "#"
    fmt.Fprintln(out, a);
    t := 0
    for i := 0; i < n / 2; i++ {
        if t == 0 {
            fmt.Fprintln(out, r)
        } else {
            fmt.Fprintln(out, l)
        }
        fmt.Fprintln(out, a)
        t = 1 - t
    }
}

package main

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

// https://codeforces.com/problemset/problem/510/A
// A. Fox And Snake
// time limit per test
// 2 seconds
// memory limit per test
// 256 megabytes
// input
// standard input
// output
// standard output

// Fox Ciel starts to learn programming. The first task is drawing a fox! However, that turns out to be too hard for a beginner, so she decides to draw a snake instead.

// A snake is a pattern on a n by m table. Denote c-th cell of r-th row as (r, c). The tail of the snake is located at (1, 1), then it's body extends to (1, m), then goes down 2 rows to (3, m), then goes left to (3, 1) and so on.

// Your task is to draw this snake for Fox Ciel: the empty cells should be represented as dot characters ('.') and the snake cells should be filled with number signs ('#').

// Consider sample tests in order to understand the snake pattern.
// Input

// The only line contains two integers: n and m (3 ≤ n, m ≤ 50).

// n is an odd number.
// Output

// Output n lines. Each line should contain a string consisting of m characters. Do not output spaces.

func main() {
	var n, m int
	_, _ = fmt.Scan(&n, &m)

	bufStdout := bufio.NewWriter(os.Stdout)
	defer bufStdout.Flush()

	for i := 0; i < n; i++ {
		if i%2 == 0 {
			for i := 0; i < m; i++ {
				_, _ = bufStdout.WriteRune('#')
			}

		} else {
			if i%4 == 1 {
				for i := 0; i < m-1; i++ {
					_, _ = bufStdout.WriteRune('.')
				}
				_, _ = bufStdout.WriteRune('#')

			} else {
				_, _ = bufStdout.WriteRune('#')
				for i := 0; i < m-1; i++ {
					_, _ = bufStdout.WriteRune('.')
				}
			}

		}

		if i < n-1 {
			_, _ = bufStdout.WriteRune('\n')
		}
	}
}

package main

import "fmt"

// https://codeforces.com/problemset/problem/510/A
// комментарии к решению
// Все используемые в выводе символы входят в ASCII таблицу
// и занимают 1 байт в кодировке UTF-8, поэтому можно выделить
// []byte необходимого размера и заполнить его, согласно
// предопределенной маске в задаче
func taskSolution(n int, m int) string {
	//if n < 3 || m < 3 {
	//	panic("invalid parameters")
	//}
	ans := make([]byte, 0, n*(m+1)+1)

	// init first line to prevent trimming \n at the end
	for j := 0; j < m; j += 1 {
		ans = append(ans, byte('#'))
	}

	for i := 1; i < n; i += 1 {
		ans = append(ans, byte('\n'))
		switch i % 4 {
		case 0, 2:
			for j := 0; j < m; j += 1 {
				ans = append(ans, byte('#'))
			}
		case 1:
			for j := 1; j < m; j += 1 {
				ans = append(ans, byte('.'))
			}
			ans = append(ans, byte('#'))
		case 3:
			ans = append(ans, byte('#'))
			for j := 1; j < m; j += 1 {
				ans = append(ans, byte('.'))
			}
		}
	}
	return string(ans)
}

func main() {
	var n, m int
	if _, err := fmt.Scan(&n, &m); err != nil {
		panic(err)
	}

	fmt.Println(taskSolution(n, m))
}

package main

import "fmt"

// https://codeforces.com/problemset/problem/510/A
// комментарии к решению
// Все используемые в выводе символы входят в ASCII таблицу
// и занимают 1 байт в кодировке UTF-8, поэтому можно выделить
// []byte необходимого размера и заполнить его, согласно
// предопределенной маске в задаче
func taskSolution(n int, m int) string {
	if n < 3 || m < 3 {
		panic("")
	}
	ans := make([]byte, 0, n*(m+1))
	for i := 0; i < n; i += 1 {
		switch i % 4 {
		case 0, 2:
			for j := 0; j < m; j += 1 {
				ans = append(ans, byte('#'))
			}
		case 1:
			for j := 1; j < m; j += 1 {
				ans = append(ans, byte('.'))
			}
			ans = append(ans, byte('#'))
		case 3:
			ans = append(ans, byte('#'))
			for j := 1; j < m; j += 1 {
				ans = append(ans, byte('.'))
			}
		}
		ans = append(ans, byte('\n'))
	}
	return string(ans[:len(ans)-1])
}

func main() {
	var n, m int
	if _, err := fmt.Scan(&n, &m); err != nil {
		panic(err)
	}

	fmt.Println(taskSolution(n, m))
}

package main

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

func GetScanner() func(a ...*int) {
    scanner := bufio.NewScanner(os.Stdin)
    scanner.Split(bufio.ScanWords)

    ScanInts := func(a ...*int) {
        for i := 0; i < len(a); i++ {
            scanner.Scan()
            *(a[i]), _ = strconv.Atoi(scanner.Text())
        }
    }
    return ScanInts
}

func main() {
    var n, m int
    ScanInts := GetScanner()
    ScanInts(&n, &m)
    for i := 0; i < n; i++ {
        if i%2 == 0 {
            for j := 0; j < m; j++ {
                fmt.Print("*")
            }
            fmt.Println()
        } else {
            if i%4 == 1 {
                for j := 0; j < m-1; j++ {
                    fmt.Print(".")
                }
                fmt.Println("*")
            } else {
                fmt.Print("*")
                for j := 1; j < m; j++ {
                    fmt.Print(".")
                }
                fmt.Println()
            }
        }
    }
}

package main

import (
	"fmt"
)

func main() {
	var n, m int
	sharp := "##"
	point := ""
	fmt.Scanf("%d %d \n", &n, &m)
	for i := 0; i < m-2; i++ {
		sharp += "#"
		point += "."
	}
	for i := 0; i < n; i++ {
		if i%2 == 0 {
			println(sharp)
		}
		if i%4 == 1 {
			println("." + point + "#")
		}
		if i%4 == 3 {
			println("#" + point + ".")
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	var n, m int
	sharp := "##"
	point := ""
	fmt.Scanf("%d %d", &n, &m)
	for i := 0; i < m-2; i++ {
		sharp += "#"
		point += "."
	}
	for i := 0; i < n; i++ {
		if i%2 == 0 {
			println(sharp)
		}
		if i%4 == 1 {
			println("." + point + "#")
		}
		if i%4 == 3 {
			println("#" + point + ".")
		}
	}
}

package main

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

func main() {
	reader := bufio.NewReaderSize(os.Stdin, 1024*1024)
	line := readLine(reader)
	var n, m int = 0, 0
	fmt.Sscanf(line, "%d %d", &n, &m)
	fmt.Println(n, m)
	swap := true
	for i := 0; i < n; i++ {
		line := ""
		for j := 0; j < m; j++ {
			if i%2 != 0 {
				line += "."
			} else {
				line += "#"
			}
		}
		if i%2 != 0 {
			if swap {
				line = line[:m-1] + "#"
			} else {
				line = "#" + line[1:]
			}
			swap = !swap
		}
		fmt.Println(line)
	}
}

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

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

package main

import "fmt"

func main() {
	c,r := 0 , 0
	fmt.Scan(&r , &c)
	k := true
	for i := 0; i < r; i++ {
		for j := 0; j < c; j++ {
			if i % 2 == 0 {
				fmt.Print("#")
			} else if k == true {
				if j == c - 1 {
					fmt.Print("#")
					k = false
				} else {
					fmt.Print(".")
				}
			} else {
				if j == 0 {
					fmt.Print("#")
				}else if j == c - 1 {
					k = true
				} else {
					fmt.Print(".")
				}
			}
		}
		fmt.Println("")
	}
}

package main

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

var reader *bufio.Reader

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

var n, m int

func main() {
	fmt.Fscan(reader, &n, &m)
	for i := 0; i < n; i++ {
		if i%2 == 0 {
			for j := 0; j < m; j++ {
				fmt.Print("#")
			}
			fmt.Println()
		} else if i/2%2 == 0 {
			for j := 0; j < m-1; j++ {
				fmt.Print(".")
			}
			fmt.Print("#")
			fmt.Println()
		} else {
			fmt.Print("#")
			for j := 0; j < m-1; j++ {
				fmt.Print(".")
			}
			fmt.Println()
		}
	}
	fmt.Println(n)
}


package main

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

const (
	MaxN = 200005
	Pow = 31
)

var n int
var a []int64
var best []int64
var max int
var c map[int64]bool

func check(b []int64) {
	if max < len(b) {
		max = len(b)
		best = b
	}
}

func main() {
	buf := bufio.NewReader(os.Stdin)
	c = make(map[int64]bool)
	fmt.Fscanf(buf, "%d\n", &n)
	for i := 0; i < n; i++ {
		var tmp int64
		fmt.Fscanf(buf, "%d", &tmp)
		c[tmp] = true
	}
	for k := range c {
		a = append(a, k)
	}

	l := len(a)
	max = 1
	best = []int64{a[0]}
l:
	for i := 0; i < l; i++ {
		for j := 0; j < 31; j++ {
			for _, sign := range []int64{-1, 1} {
				t1 := a[i] + sign * 1<<uint64(j)
				if c[t1] {
					t2 := a[i] + sign * 1<<uint64(j+1)
					if c[t2] {
						check([]int64{a[i], t1, t2})
						break l
					} else {
						check([]int64{a[i], t1})
					}
				}
			}
		}
	}
	fmt.Println(max)
	for i := 0; i < max; i++ {
		fmt.Printf("%d ", best[i])
	}
}

package main

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

// github.com/EndlessCheng/codeforces-go
func CF988D(_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 {
		Fscan(in, &a[i])
		a[i] += 1e9
	}
	sort.Ints(a)
	var ans []int
o:
	for i := 0; i < 31; i++ {
		d := 1 << i
		g := map[int][]int{}
		for _, x := range a {
			g[x%d] = append(g[x%d], x)
		}
		for _, xs := range g {
			for j := 0; j < len(xs); {
				b := []int{}
				for j0 := j; j < len(xs) && xs[j] == xs[j0]+(j-j0)*d; j++ {
					b = append(b, xs[j]-1e9)
					if len(b) == 3 {
						ans = b
						break o
					}
				}
				if len(b) > len(ans) {
					ans = b
				}
			}
		}
	}
	Fprintln(out, len(ans))
	for _, v := range ans {
		Fprint(out, v, " ")
	}
}

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

package main

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

// github.com/EndlessCheng/codeforces-go
func CF988D(_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 {
		Fscan(in, &a[i])
		a[i] += 1e9
	}
	sort.Ints(a)
	var ans []interface{}
o:
	for i := 0; i < 31; i++ {
		d := 1 << i
		g := map[int][]int{}
		for _, x := range a {
			g[x%d] = append(g[x%d], x)
		}
		for _, xs := range g {
			for j := 0; j < len(xs); {
				b := []interface{}{}
				for j0 := j; j < len(xs) && xs[j] == xs[j0]+(j-j0)*d; j++ {
					b = append(b, xs[j]-1e9)
					if len(b) == 3 {
						ans = b
						break o
					}
				}
				if len(b) > len(ans) {
					ans = b
				}
			}
		}
	}
	Fprintln(out, len(ans))
	Fprint(out, ans...)
}

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

package main

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

// github.com/EndlessCheng/codeforces-go
func CF988D(_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 {
		Fscan(in, &a[i])
		a[i] += 1e9
	}
	sort.Ints(a)
	var ans []interface{}
	for i := 0; i < 31; i++ {
		d := 1 << i
		g := map[int][]int{}
		for _, x := range a {
			g[x%d] = append(g[x%d], x)
		}
		for _, xs := range g {
			for j := 0; j < len(xs); {
				b := []interface{}{}
				for j0 := j; j < len(xs) && xs[j] == xs[j0]+(j-j0)*d; j++ {
					b = append(b, xs[j]-1e9)
				}
				if len(b) > len(ans) {
					ans = b
				}
			}
		}
	}
	Fprintln(out, len(ans))
	Fprint(out, ans...)
}

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