/*
	A template for Go on codeforces.com
	Author: Yakov, frvr.ru
*/

package main

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

func main() {
	// START WRITING YOUR SOLUTION HERE:
	// writeLine(typeOf(readInt()))
	N := readInt()
	for i := 0; i < N; i += 1 {
		K := readInt()
		// score0 := int(0)

		// l1 := 1
		// for l2 := 1; ; l2 += 1 {
		// 	l3 := K - 3 - l2 - l1
		// 	if l3 < l2 {
		// 		break
		// 	}
		// 	score := score(l1, l2, l3)

		// 	score1 := l2 - 1
		// 	if l2 > (K-3)/3 {
		// 		score1 = K - 4 - 2*l2
		// 	}

		// 	if score != score1 {
		// 		fmt.Println("DEBUG", l2, K, score, score1)
		// 	}

		// 	score0 = max(score, score0)
		// }

		score1 := (K-3)/3 - 1

		// fmt.Println(score0, score1)
		fmt.Println(score1)
	}
}

func score(l1, l2, l3 int) int {
	return min(abs(l2-l1), min(abs(l3-l2), abs(l1-l3)))
}

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

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

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

/* ~~~~~~~~~~ */
/* ~~~~~~~~~~ */
/* ~~~~~~~~~~ */

var in = bufio.NewReader(os.Stdin)

type float = float32
type double = float64
type long = int64
type ulong = uint64

func typeOf(arg interface{}) string {
	switch reflect.TypeOf(arg).Kind() {
	case reflect.Int:
		return "int"
	case reflect.Int8:
		return "int8"
	case reflect.Int16:
		return "int16"
	case reflect.Int32:
		return "int32"
	case reflect.Int64:
		return "int64"
	case reflect.Uint:
		return "uint"
	case reflect.Uint8:
		return "uint8"
	case reflect.Uint16:
		return "uint16"
	case reflect.Uint32:
		return "uint32"
	case reflect.Uint64:
		return "uint64"
	case reflect.Float32:
		return "float32"
	case reflect.Float64:
		return "float64"
	case reflect.Complex64:
		return "complex64"
	case reflect.Complex128:
		return "complex128"
	case reflect.Bool:
		return "bool"
	case reflect.String:
		return "string"
	case reflect.Chan:
		return "chan"
	case reflect.Ptr:
		return "ptr"
	case reflect.Uintptr:
		return "uintptr"
	case reflect.UnsafePointer:
		return "unsafeptr"
	case reflect.Interface:
		return "interface"
	case reflect.Array:
		return "array"
	case reflect.Slice:
		return "slice"
	case reflect.Map:
		return "map"
	case reflect.Struct:
		return "struct"
	case reflect.Func:
		return "func"
	case reflect.Invalid:
		return "invalid"
	default:
		return "nil"
	}
}

/* ~~~~~~~~~~ */

func _scln() string {
	ln, _ := in.ReadString('\n')
	return strings.Trim(ln, " \r\n")
}
func _sc(s []string) string {
	if len(s) == 0 {
		return _scln()
	}
	return s[0]
}

func readLine() string              { return _scln() }
func readString() string            { return _scln() }
func readStrings() []string         { return strings.Split(_scln(), " ") }
func readBool(s ...string) bool     { t, _ := strconv.ParseBool(_sc(s)); return t }
func readByte(s ...string) byte     { t, _ := strconv.ParseUint(_sc(s), 10, 8); return byte(t) }
func readDouble(s ...string) double { t, _ := strconv.ParseFloat(_sc(s), 64); return t }
func readFloat(s ...string) float   { t, _ := strconv.ParseFloat(_sc(s), 32); return float32(t) }
func readInt(s ...string) int       { t, _ := strconv.Atoi(_sc(s)); return t }
func readLong(s ...string) long     { t, _ := strconv.ParseInt(_sc(s), 10, 64); return t }
func readULong(s ...string) ulong   { t, _ := strconv.ParseUint(_sc(s), 10, 64); return t }

/* ~~~~~~~~~~ */

// Too much overhead with universal method using interface{}, wait for the generics,
// but for now — just don't look at the redundancy of the code after that commentary :)

func readBools() []bool {
	strs := readStrings()
	arr := make([]bool, len(strs))
	for i, s := range strs {
		arr[i] = readBool(s)
	}
	return arr
}
func readBytes() []byte {
	strs := readStrings()
	arr := make([]byte, len(strs))
	for i, s := range strs {
		arr[i] = readByte(s)
	}
	return arr
}
func readDoubles() []double {
	strs := readStrings()
	arr := make([]double, len(strs))
	for i, s := range strs {
		arr[i] = readDouble(s)
	}
	return arr
}
func readFloats() []float {
	strs := readStrings()
	arr := make([]float, len(strs))
	for i, s := range strs {
		arr[i] = readFloat(s)
	}
	return arr
}
func readInts() []int {
	strs := readStrings()
	arr := make([]int, len(strs))
	for i, s := range strs {
		arr[i] = readInt(s)
	}
	return arr
}
func readLongs() []long {
	strs := readStrings()
	arr := make([]long, len(strs))
	for i, s := range strs {
		arr[i] = readLong(s)
	}
	return arr
}
func readULongs() []ulong {
	strs := readStrings()
	arr := make([]ulong, len(strs))
	for i, s := range strs {
		arr[i] = readULong(s)
	}
	return arr
}

/* ~~~~~~~~~~ */

func write(arg ...interface{})                 { fmt.Print(arg...) }
func writeLine(arg ...interface{})             { fmt.Println(arg...) }
func writeFormat(f string, arg ...interface{}) { fmt.Printf(f, arg...) }

package main
// github.com/jamesgrimard/codeforces
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 n int
		fmt.Fscan(in,&n)
		var a,b,c int
		a = 1
		if (n - 3) % 3 == 0 {
			b = (n - 3) / 3
		} else {
			b = (n - 3) / 3 * 2
		}
		c = n - 3 - (a + b)
		fmt.Fprintln(out,min(abs(a-b),abs(b-c),abs(a-c)))
	}
}
func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

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

package main

import (
	. "fmt"
)

var t int

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

func main() {

	Scan(&t)
	for i := 0; i < t; i++ {
		var n int64
		Scan(&n)
		Println(max(0, (n-6)/3))
	}
}

package main

import (
	"fmt"
)

func main() {
	var tests int
	fmt.Scan(&tests)
	for i := 0; i < tests; i++ {
		var n int
		fmt.Scan(&n)
		fmt.Println((n - 6) / 3)
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"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 n int
		fmt.Fscan(in, &n)

		d := int(math.Floor(float64(n) / 3))
		a := d - 1
		// b := d*2 - d - 1
		// c := n - d*2 - 1

		fmt.Fprintln(out, a-1)
	}
}

package main

import "fmt"

func main() {
	round := 0
	fmt.Scanf("%d\n", &round)
	for i := 0; i < round; i++ {
		input := 0
		fmt.Scanf("%d\n", &input)
		num1, num2, num3 := 0, 0, 0
		num2 = (input - 3) / 3
		num1 = 1
		num3 = input - num2 - num1
		fmt.Println(min(num3-num2, num2-num1))
	}
	return
}

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

package main

import "fmt"

func main() {
	var n int
	fmt.Scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		var k int
		fmt.Scanf("%d\n", &k)
		fmt.Printf("%d\n", (k-6)/3)
	}
}

package main

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

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

func scanf(format string, args ...interface{})  { fmt.Fscanf(reader, format, args...) }
func printf(format string, args ...interface{}) { fmt.Fprintf(writer, format, args...) }

func main() {
	defer writer.Flush()

	var t int
	scanf("%d\n", &t)
	for i := 0; i < t; i++ {
		var n int64
		scanf("%d\n", &n)
		answer(n)
	}
}

func answer(n int64) {
	total := n - 3
	ans := (total / 3) - 1

	printf("%d\n", ans)
}

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 solve() {
	var n int
	scan(&n)
	printf("%d\n", int(n/3)-2)
}
func main() {
	defer out.Flush()
	n := 0
	scan(&n)
	for i := 0; i < n; i++ {
		solve()
	}
}

package main

import "fmt"

func main() {
	var t int
	var n int64
	var outputArr [1000]int64
	_, err := fmt.Scanln(&t)
	if err != nil {
		fmt.Println(err)
	}
	for i := 0; i < t; i++ {
		_, err2 := fmt.Scanln(&n)
		if err2 != nil {
			fmt.Println(err2)
		}
		result := n/3 - 2
		outputArr[i] = result
	}
	for j := 0; j < t; j++ {
		fmt.Println(outputArr[j])
	}
}

package main

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

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

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

	var T, n int
	fmt.Fscan(r, &T)

	for i := 0; i < T; i++ {
		fmt.Fscan(r, &n)
		x := (n - 3) / 3
		y := n - 4 -x

		if abs(x - 1) > abs(y - x) {
			fmt.Fprintln(w, abs(y - x))
		} else {
			fmt.Fprintln(w, x - 1)
		}
	}
}

package main

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

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

func main() {
	defer out.Flush()

	var tc, n int
	for fmt.Fscan(in, &tc); tc > 0; tc-- {
		fmt.Fscan(in, &n)
		lo, hi := 0, n
		for lo <= hi {
			m := (lo + hi) / 2
			if 1 + (m+1) + (2*m+1) <= n-3 {
				lo = m+1
			} else {
				hi = m-1
			}
		}
		fmt.Println(hi)
	}
}

package main

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

const cf = true

func solve() {
	var n int
	fmt.Fscan(in, &n)
	fmt.Fprintln(out, (n-3)/3-1)
}

func main() {
	defer out.Flush()
	t := 1
	fmt.Fscan(in, &t)
	for ; t > 0; t-- {
		solve()
	}
}

func ConvertInt(val string, base, toBase int) (string, error) {
	i, err := strconv.ParseInt(val, base, 64)
	if err != nil {
		return "", err
	}
	return strconv.FormatInt(i, toBase), nil
}

type set[T Ordered] struct {
	itms map[T]struct{}
}

func (s *set[T]) init() {
	if s.itms == nil {
		s.itms = make(map[T]struct{})
	}
}

func (s *set[T]) add(item T) *set[T] {
	s.init()
	s.itms[item] = exists
	return s
}

func (s *set[T]) remove(item T) *set[T] {
	s.init()
	delete(s.itms, item)
	return s
}

func (s *set[T]) has(item T) bool {
	s.init()
	_, c := s.itms[item]
	return c
}

func (s *set[T]) sortedItems() []T {
	s.init()
	items := make([]T, 0, s.size())
	for item := range s.itms {
		items = append(items, item)
	}
	sort.Slice(items, func(i, j int) bool {
		return items[i] < items[j]
	})
	return items
}

func (s *set[T]) items() []T {
	s.init()
	items := make([]T, 0, s.size())
	for item := range s.itms {
		items = append(items, item)
	}
	return items
}

func (s *set[T]) size() int {
	s.init()
	return len(s.itms)
}

var exists = struct{}{}

const MaxUint = ^uint(0)
const MinUint = 0
const MaxInt = int(MaxUint >> 1)
const MinInt = -MaxInt - 1

func reverseStr(s string) string {
	r := []rune(s)
	for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 {
		r[i], r[j] = r[j], r[i]
	}
	return string(r)
}

type Float interface {
	~float32 | ~float64
}

type Integer interface {
	Signed | Unsigned
}

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64
}

type Unsigned interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
}

type Ordered interface {
	Integer | Float | ~string
}

func abs[T Signed](x T) T {
	if x < 0 {
		return -x
	}
	return x
}

func min[T Ordered](x, y T) T {
	if x < y {
		return x
	}
	return y
}

func max[T Ordered](x, y T) T {
	if x > y {
		return x
	}
	return y
}

var (
	in  = getReader()
	out = getWriter()
)

func getReader() *bufio.Reader {
	if cf {
		return bufio.NewReader(os.Stdin)
	} else {
		in, _ := os.Open("input.txt")
		return bufio.NewReader(in)
	}
}

func getWriter() *bufio.Writer {
	if cf {
		return bufio.NewWriter(os.Stdout)
	} else {
		out, _ := os.Create("output.txt")
		return bufio.NewWriter(out)
	}
}

package main

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

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

func init() {
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 4096), 1e9)
}

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

func _int() int {
	s := _string()
	i := 0
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int(r - '0')
	}
	return i
}

func _int64() int64 {
	s := _string()
	i := int64(0)
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int64(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int64(r - '0')
	}
	return i
}

func _string() string {
	if !scanner.Scan() {
		panic(scanner.Err())
	}
	return scanner.Text()
}

func main() {
	defer writer.Flush()
	for t := _int(); t > 0; t-- {
		n := _int()
		printf("%d\n", n/3-2)
	}
}

/*
	A template for Go on codeforces.com
	Author: Yakov, frvr.ru
*/

package main

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

func main() {
	// START WRITING YOUR SOLUTION HERE:
	// writeLine(typeOf(readInt()))
	N := readInt()
	for i := 0; i < N; i += 1 {
		K := readInt()
		score0 := int(0)

		l1 := 1
		for l2 := 1; ; l2 += 1 {
			l3 := K - 3 - l2
			if l3 < l2 {
				break
			}
			score := score(l1, l2, l3)
			score0 = max(score, score0)
		}

		fmt.Println(score0)
	}
}

func score(l1, l2, l3 int) int {
	return min(abs(l2-l1), min(abs(l3-l2), abs(l1-l3)))
}

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

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

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

/* ~~~~~~~~~~ */
/* ~~~~~~~~~~ */
/* ~~~~~~~~~~ */

var in = bufio.NewReader(os.Stdin)

type float = float32
type double = float64
type long = int64
type ulong = uint64

func typeOf(arg interface{}) string {
	switch reflect.TypeOf(arg).Kind() {
	case reflect.Int:
		return "int"
	case reflect.Int8:
		return "int8"
	case reflect.Int16:
		return "int16"
	case reflect.Int32:
		return "int32"
	case reflect.Int64:
		return "int64"
	case reflect.Uint:
		return "uint"
	case reflect.Uint8:
		return "uint8"
	case reflect.Uint16:
		return "uint16"
	case reflect.Uint32:
		return "uint32"
	case reflect.Uint64:
		return "uint64"
	case reflect.Float32:
		return "float32"
	case reflect.Float64:
		return "float64"
	case reflect.Complex64:
		return "complex64"
	case reflect.Complex128:
		return "complex128"
	case reflect.Bool:
		return "bool"
	case reflect.String:
		return "string"
	case reflect.Chan:
		return "chan"
	case reflect.Ptr:
		return "ptr"
	case reflect.Uintptr:
		return "uintptr"
	case reflect.UnsafePointer:
		return "unsafeptr"
	case reflect.Interface:
		return "interface"
	case reflect.Array:
		return "array"
	case reflect.Slice:
		return "slice"
	case reflect.Map:
		return "map"
	case reflect.Struct:
		return "struct"
	case reflect.Func:
		return "func"
	case reflect.Invalid:
		return "invalid"
	default:
		return "nil"
	}
}

/* ~~~~~~~~~~ */

func _scln() string {
	ln, _ := in.ReadString('\n')
	return strings.Trim(ln, " \r\n")
}
func _sc(s []string) string {
	if len(s) == 0 {
		return _scln()
	}
	return s[0]
}

func readLine() string              { return _scln() }
func readString() string            { return _scln() }
func readStrings() []string         { return strings.Split(_scln(), " ") }
func readBool(s ...string) bool     { t, _ := strconv.ParseBool(_sc(s)); return t }
func readByte(s ...string) byte     { t, _ := strconv.ParseUint(_sc(s), 10, 8); return byte(t) }
func readDouble(s ...string) double { t, _ := strconv.ParseFloat(_sc(s), 64); return t }
func readFloat(s ...string) float   { t, _ := strconv.ParseFloat(_sc(s), 32); return float32(t) }
func readInt(s ...string) int       { t, _ := strconv.Atoi(_sc(s)); return t }
func readLong(s ...string) long     { t, _ := strconv.ParseInt(_sc(s), 10, 64); return t }
func readULong(s ...string) ulong   { t, _ := strconv.ParseUint(_sc(s), 10, 64); return t }

/* ~~~~~~~~~~ */

// Too much overhead with universal method using interface{}, wait for the generics,
// but for now — just don't look at the redundancy of the code after that commentary :)

func readBools() []bool {
	strs := readStrings()
	arr := make([]bool, len(strs))
	for i, s := range strs {
		arr[i] = readBool(s)
	}
	return arr
}
func readBytes() []byte {
	strs := readStrings()
	arr := make([]byte, len(strs))
	for i, s := range strs {
		arr[i] = readByte(s)
	}
	return arr
}
func readDoubles() []double {
	strs := readStrings()
	arr := make([]double, len(strs))
	for i, s := range strs {
		arr[i] = readDouble(s)
	}
	return arr
}
func readFloats() []float {
	strs := readStrings()
	arr := make([]float, len(strs))
	for i, s := range strs {
		arr[i] = readFloat(s)
	}
	return arr
}
func readInts() []int {
	strs := readStrings()
	arr := make([]int, len(strs))
	for i, s := range strs {
		arr[i] = readInt(s)
	}
	return arr
}
func readLongs() []long {
	strs := readStrings()
	arr := make([]long, len(strs))
	for i, s := range strs {
		arr[i] = readLong(s)
	}
	return arr
}
func readULongs() []ulong {
	strs := readStrings()
	arr := make([]ulong, len(strs))
	for i, s := range strs {
		arr[i] = readULong(s)
	}
	return arr
}

/* ~~~~~~~~~~ */

func write(arg ...interface{})                 { fmt.Print(arg...) }
func writeLine(arg ...interface{})             { fmt.Println(arg...) }
func writeFormat(f string, arg ...interface{}) { fmt.Printf(f, arg...) }

/*
	A template for Go on codeforces.com
	Author: Yakov, frvr.ru
*/

package main

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

func main() {
	// START WRITING YOUR SOLUTION HERE:
	// writeLine(typeOf(readInt()))
	N := readInt()
	for i := 0; i < N; i += 1 {
		K := readInt()
		score0 := int(0)

		l1 := 1
		for l2 := 2; ; l2 += 1 {
			l3 := K - 3 - l2
			if l3 <= l2 {
				break
			}
			score := min(abs(l2-l1), min(abs(l3-l2), abs(l1-l3)))
			score0 = max(score, score0)
		}

		fmt.Println(score0)
	}
}

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

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

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

/* ~~~~~~~~~~ */
/* ~~~~~~~~~~ */
/* ~~~~~~~~~~ */

var in = bufio.NewReader(os.Stdin)

type float = float32
type double = float64
type long = int64
type ulong = uint64

func typeOf(arg interface{}) string {
	switch reflect.TypeOf(arg).Kind() {
	case reflect.Int:
		return "int"
	case reflect.Int8:
		return "int8"
	case reflect.Int16:
		return "int16"
	case reflect.Int32:
		return "int32"
	case reflect.Int64:
		return "int64"
	case reflect.Uint:
		return "uint"
	case reflect.Uint8:
		return "uint8"
	case reflect.Uint16:
		return "uint16"
	case reflect.Uint32:
		return "uint32"
	case reflect.Uint64:
		return "uint64"
	case reflect.Float32:
		return "float32"
	case reflect.Float64:
		return "float64"
	case reflect.Complex64:
		return "complex64"
	case reflect.Complex128:
		return "complex128"
	case reflect.Bool:
		return "bool"
	case reflect.String:
		return "string"
	case reflect.Chan:
		return "chan"
	case reflect.Ptr:
		return "ptr"
	case reflect.Uintptr:
		return "uintptr"
	case reflect.UnsafePointer:
		return "unsafeptr"
	case reflect.Interface:
		return "interface"
	case reflect.Array:
		return "array"
	case reflect.Slice:
		return "slice"
	case reflect.Map:
		return "map"
	case reflect.Struct:
		return "struct"
	case reflect.Func:
		return "func"
	case reflect.Invalid:
		return "invalid"
	default:
		return "nil"
	}
}

/* ~~~~~~~~~~ */

func _scln() string {
	ln, _ := in.ReadString('\n')
	return strings.Trim(ln, " \r\n")
}
func _sc(s []string) string {
	if len(s) == 0 {
		return _scln()
	}
	return s[0]
}

func readLine() string              { return _scln() }
func readString() string            { return _scln() }
func readStrings() []string         { return strings.Split(_scln(), " ") }
func readBool(s ...string) bool     { t, _ := strconv.ParseBool(_sc(s)); return t }
func readByte(s ...string) byte     { t, _ := strconv.ParseUint(_sc(s), 10, 8); return byte(t) }
func readDouble(s ...string) double { t, _ := strconv.ParseFloat(_sc(s), 64); return t }
func readFloat(s ...string) float   { t, _ := strconv.ParseFloat(_sc(s), 32); return float32(t) }
func readInt(s ...string) int       { t, _ := strconv.Atoi(_sc(s)); return t }
func readLong(s ...string) long     { t, _ := strconv.ParseInt(_sc(s), 10, 64); return t }
func readULong(s ...string) ulong   { t, _ := strconv.ParseUint(_sc(s), 10, 64); return t }

/* ~~~~~~~~~~ */

// Too much overhead with universal method using interface{}, wait for the generics,
// but for now — just don't look at the redundancy of the code after that commentary :)

func readBools() []bool {
	strs := readStrings()
	arr := make([]bool, len(strs))
	for i, s := range strs {
		arr[i] = readBool(s)
	}
	return arr
}
func readBytes() []byte {
	strs := readStrings()
	arr := make([]byte, len(strs))
	for i, s := range strs {
		arr[i] = readByte(s)
	}
	return arr
}
func readDoubles() []double {
	strs := readStrings()
	arr := make([]double, len(strs))
	for i, s := range strs {
		arr[i] = readDouble(s)
	}
	return arr
}
func readFloats() []float {
	strs := readStrings()
	arr := make([]float, len(strs))
	for i, s := range strs {
		arr[i] = readFloat(s)
	}
	return arr
}
func readInts() []int {
	strs := readStrings()
	arr := make([]int, len(strs))
	for i, s := range strs {
		arr[i] = readInt(s)
	}
	return arr
}
func readLongs() []long {
	strs := readStrings()
	arr := make([]long, len(strs))
	for i, s := range strs {
		arr[i] = readLong(s)
	}
	return arr
}
func readULongs() []ulong {
	strs := readStrings()
	arr := make([]ulong, len(strs))
	for i, s := range strs {
		arr[i] = readULong(s)
	}
	return arr
}

/* ~~~~~~~~~~ */

func write(arg ...interface{})                 { fmt.Print(arg...) }
func writeLine(arg ...interface{})             { fmt.Println(arg...) }
func writeFormat(f string, arg ...interface{}) { fmt.Printf(f, arg...) }

package main

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

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

func init() {
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 4096), 1e9)
}

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

func _int() int {
	s := _string()
	i := 0
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int(r - '0')
	}
	return i
}

func _int64() int64 {
	s := _string()
	i := int64(0)
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int64(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int64(r - '0')
	}
	return i
}

func _string() string {
	if !scanner.Scan() {
		panic(scanner.Err())
	}
	return scanner.Text()
}

func main() {
	defer writer.Flush()
	for t := _int(); t > 0; t-- {
		n := _int()
		printf("%d\n", sol(n))
	}
}

func sol(n int) int {
	s := n - 4
	u := s / 3
	l1 := 1
	l2 := u
	l3 := s - u
	return min(l2-l1, l3-l2)
}

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

package main

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

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

func init() {
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 4096), 1e9)
}

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

func _int() int {
	s := _string()
	i := 0
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int(r - '0')
	}
	return i
}

func _int64() int64 {
	s := _string()
	i := int64(0)
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int64(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int64(r - '0')
	}
	return i
}

func _string() string {
	if !scanner.Scan() {
		panic(scanner.Err())
	}
	return scanner.Text()
}

func main() {
	defer writer.Flush()
	for t := _int(); t > 0; t-- {
		n := _int()
		printf("%d\n", sol(n))
	}
}

func sol(n int) int {
	s := n - 4
	u := s / 3
	l1 := 1
	l2 := l1 + u
	l3 := 1 + s - u
	return min(l2-l1, l3-l2)
}

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

package main

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

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

func init() {
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 4096), 1e9)
}

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

func _int() int {
	s := _string()
	i := 0
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int(r - '0')
	}
	return i
}

func _int64() int64 {
	s := _string()
	i := int64(0)
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int64(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int64(r - '0')
	}
	return i
}

func _string() string {
	if !scanner.Scan() {
		panic(scanner.Err())
	}
	return scanner.Text()
}

func main() {
	defer writer.Flush()
	for t := _int(); t > 0; t-- {
		n := _int()
		printf("%d\n", sol(n))
	}
}

func sol(n int) int {
	if n == 6 {
		return 0
	}
	s := n - 4
	u := s / 3
	l1 := 1
	l2 := l1 + u
	l3 := s - u
	return min(l2-l1, l3-l2)
}

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

package main
// github.com/jamesgrimard/codeforces
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 n int
		fmt.Fscan(in,&n)
		var a,b,c int
		a = 1
		b = (n - 3) / 3 * 2
		c = n - 3 - (a + b)
		if n == 6 {
			fmt.Fprintln(out,0)
		} else {
			fmt.Fprintln(out,min(abs(a-b),abs(b-c),abs(a-c)))
		}
	}
}
func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

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

package main
// github.com/jamesgrimard/codeforces
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 n int
		fmt.Fscan(in,&n)
		var a,b,c int
		a = 1
		b = (n - 3) / 3 * 2
		c = n - 3 - (a + b)
		fmt.Fprintln(out,min(abs(a-b),abs(b-c),abs(a-c)))
	}
}
func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

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

package main

import (
    ."fmt"
)

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

func main(){

    var n int64

    Scan(&n)

    Println(max(0, (n - 6) / 3))
}

package main

import (
	"fmt"
)

func main() {
	var tests int
	fmt.Scan(&tests)
	for i := 0; i < tests; i++ {
		var n int
		fmt.Scan(&n)
		fmt.Println((n - 7) / 3)
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"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 n float64
		fmt.Fscan(in, &n)

		fmt.Fprintln(out, math.Floor(n/3)-2)
	}
}


package main

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

var sc = bufio.NewScanner(os.Stdin)
var wr = bufio.NewWriter(os.Stdout)

func out(x ...interface{}) {
	fmt.Fprint(wr, x...)
}

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

func nextInt64() int64 {
	i, e := strconv.ParseInt(next(), 10, 64)
	if e != nil {
		panic(e)
	}
	return i
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	defer wr.Flush()
	sc.Buffer(make([]byte, 0), 1000000009)
	sc.Split(bufio.ScanWords)

	solve()
}

func solve() {
	t := nextInt()
	for i := 0; i < t; i++ {
		rating := nextInt()
		if rating <= 1399 {
			fmt.Println("Division 4")
		} else if rating <= 1599 {
			fmt.Println("Division 3")
		} else if rating <= 1899 {
			fmt.Println("Division 2")
		} else {
			fmt.Println("Division 1")
		}
	}
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var x int
		fmt.Scan(&x)
		if x <= 1399 {
			fmt.Println("Division 4")
		} else if x >= 1400 && x <= 1599 {
			fmt.Println("Division 3")
		} else if x >= 1600 && x <= 1899 {
			fmt.Println("Division 2")
		} else {
			fmt.Println("Division 1")
		}
	}

}

package main

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

/*

 */

//goland:noinspection GoUnhandledErrorResult
func solve() {
	var n int
	scanf("%d\n", &n)

	switch {
	case n <= 1399:
		fmt.Fprintln(writer, "Division 4")
	case n <= 1599:
		fmt.Fprintln(writer, "Division 3")
	case n <= 1899:
		fmt.Fprintln(writer, "Division 2")
	default:
		fmt.Fprintln(writer, "Division 1")
	}
}

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

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

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

const maxUint = ^uint(0)

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

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

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

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

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

//goland:noinspection GoUnusedFunction
func divCeil(num, div int64) int64 {
	quot := num / div
	if num%div > 0 {
		quot++
	} else if num%div < 0 {
		quot--
	}
	return quot
}

//goland:noinspection GoUnusedFunction
func min(nums ...int) int {
	return nums[minIdx(nums...)]
}

//goland:noinspection GoUnusedFunction
func minIdx(nums ...int) int {
	minNumIdx := 0
	for i, num := range nums {
		if num < nums[minNumIdx] {
			minNumIdx = i
		}
	}

	return minNumIdx
}

//goland:noinspection GoUnusedFunction
func max(nums ...int) int {
	return nums[maxIdx(nums...)]
}

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

	return maxNumIdx
}

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

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

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

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

	return true
}

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

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

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

	num = abs(num)

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

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

//goland:noinspection GoUnhandledErrorResult
func factorize(num int) []int {
	factors := []int{1}

	sqrtA := int(math.Sqrt(float64(num)))

	for ftr := 2; ftr <= sqrtA; ftr++ {
		for num%ftr == 0 {
			num /= ftr
			factors = append(factors, ftr)
		}
	}

	if num > sqrtA {
		factors = append(factors, num)
	}

	return factors
}

package main

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

const MOD int64 = 1000000007

var rate int

// ByAge implements sort.Interface based on the Age field.
type ByV []*pair

func (a ByV) Len() int           { return len(a) }
func (a ByV) Less(i, j int) bool { return a[i].v < a[j].v }
func (a ByV) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }

func main() {

	read := bufio.NewReader(os.Stdin)

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

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

		fmt.Fscan(read, &rate)

		solve()
	}
}

type pair struct {
	v int
	idx []int
}

//a b c d

//20 12 -- 4
//4  2  -- 4

func solve()  {
	if rate <= 1399 {
		fmt.Println("Division 4")
		return
	}
	if rate >= 1400 && rate <= 1599 {
		fmt.Println("Division 3")
		return
	}
	if rate >= 1600 && rate <= 1899 {
		fmt.Println("Division 2")
		return
	}
	fmt.Println("Division 1")
}

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

package main

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

var r = bufio.NewReader(os.Stdin)
var w = bufio.NewWriter(os.Stdout)

func slove() {
	defer w.Flush()
	var rat int
	fmt.Fscan(r, &rat)
	if rat <= 1399 {
		fmt.Fprintln(w, "Division 4")
	} else if rat <=1599 {
		fmt.Fprintln(w, "Division 3")

	} else if rat <= 1899 {
		fmt.Fprintln(w, "Division 2")
	} else {
		fmt.Fprintln(w, "Division 1")
	}
}

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

func main() {
	var n int
	fmt.Fscan(r, &n)
	for i:=0;i<n;i++ {
		slove()
	}
}

package main

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

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

func solve() {
	var n int
	scanf("%d\n", &n)
	if n <= 1399 {
		printf("Division 4\n")
	} else if n <= 1599 {
		printf("Division 3\n")
	} else if n <= 1899 {
		printf("Division 2\n")
	} else {
		printf("Division 1\n")
	}
}

func main() {
	defer writer.Flush()
	var cases int

	scanf("%d\n", &cases)
	// cases = 1

	for c := 0; c < cases; c++ {
		solve()
	}
}

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

func IntArray(size int) []int {
	arr := make([]int, size)
	for i := 0; i < size; i++ {
		scanf("%d", &arr[i])
	}
	scanf("\n")
	return arr
}

func Max(args ...int) int {
	m := args[0]
	for i := range args {
		if args[i] > m {
			m = args[i]
		}
	}
	return m
}

func Min(args ...int) int {
	m := args[0]
	for i := range args {
		if args[i] < m {
			m = args[i]
		}
	}
	return m
}

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 n int
		fmt.Fscan(in, &n)

		var d int
		if n <= 1399 {
			d = 4
		} else if n <= 1599 {
			d = 3
		} else if n <= 1899 {
			d = 2
		} else {
			d = 1
		}

		fmt.Fprintln(out, "Division ", d)
	}
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"io/ioutil"
	"os"
	"strings"
)

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

	solve := func(curCase int) {
		var n int
		Fscan(in, &n)
		Fprint(out, "Division ")
		if n < 1400 {
			Fprintln(out, 4)
		} else if n < 1600 {
			Fprintln(out, 3)
		} else if n < 1900 {
			Fprintln(out, 2)
		} else {
			Fprintln(out, 1)
		}
	}

	cases := 1
	Fscan(in, &cases)
	for curCase := 1; curCase <= cases; curCase++ {
		solve(curCase)
	}

	leftData, _ := ioutil.ReadAll(in)
	if s := strings.TrimSpace(string(leftData)); s != "" {
		panic("有未读入的数据：\n" + s)
	}

}

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

package main

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

func main() {
	in, out := bufio.NewReader(os.Stdin), bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t int
	fmt.Fscan(in, &t)

	for ii := 0; ii < t; ii++ {
		var n int
		fmt.Fscan(in, &n)
		if n >= 1900 {
			fmt.Fprintln(out, "Division 1")
		} else if n >= 1600 {
			fmt.Fprintln(out, "Division 2")
		} else if n >= 1400 {
			fmt.Fprintln(out, "Division 3")
		} else {
			fmt.Fprintln(out, "Division 4")
		}
	}
}

package main

import (
	"fmt"
)

func runCase(rating int) string {
	if rating <= 1399 {
		return "Division 4"
	}

	if rating <= 1599 {
		return "Division 3"
	}

	if rating <= 1899 {
		return "Division 2"
	}

	return "Division 1"
}

func main() {

	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var rating int
		fmt.Scan(&rating)
		fmt.Printf("%s\n", runCase(rating))
	}
}

package main

import "fmt"

func main() {
	var (
		testcases int
		input     int
		output    string = "Division "
	)
	fmt.Scan(&testcases)

	for testcases > 0 {
		testcases -= 1
        output = "Division "

		fmt.Scan(&input)
		if input >= 1900 {
			output += "1"
		} else if input > 1599 {
			output += "2"
		} else if input > 1399 {
			output += "3"
		} else {
			output += "4"
		}

		fmt.Println(output)
	}

}

package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a)
	for i := 0; i < a; i++ {
		fmt.Scan(&b)
		if 1900 <= b {
			fmt.Println("Division 1")
		} else if 1600 <= b && b <= 1899 {
			fmt.Println("Division 2")
		} else if 1400 <= b && b <= 1599 {
			fmt.Println("Division 3")
		} else if b <= 1399 {
			fmt.Println("Division 4")
		}
	}
}

package main

import "fmt"

var division string = "Division"
func main(){
    var t int

    fmt.Scan(&t)
    var rating int

    for i:= 0; i<t; i++{
        fmt.Scan(&rating)
        fmt.Println(Rating(rating))
    }

}
func Rating(elo int) string{

    if(elo<=1399){
        return division + " 4"
    }
    if(elo <= 1599){
        return division + " 3"
    }
    if(elo<= 1899){
        return division + " 2"
    }
        return division + " 1"
}

package main

import "fmt"

func solve(x int) string {
	if x <= 1399 {
		return "Division 4"
	} else if x <= 1599 {
		return "Division 3"
	} else if x <= 1899 {
		return "Division 2"
	} else {
		return "Division 1"
	}
}
func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var x int
		fmt.Scan(&x)
		fmt.Println(solve(x))
	}

}

package main

import "fmt"

func solve(x int) string {
	if x <= 1399 {
		return "Division 4"
	} else if 1400 <= x && x <= 1599 {
		return "Division 3"
	} else if 1600 <= x && x <= 1899 {
		return "Division 2"
	} else {
		return "Division 1"
	}
}
func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var x int
		fmt.Scan(&x)
		fmt.Println(solve(x))
	}

}

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	str, _ := reader.ReadString('\n')
	t, _ := strconv.ParseInt(strings.TrimSpace(str), 10, 32)
	tt := int(t)
	for i := 0; i < tt; i++ {
		rate, _ := reader.ReadString('\n')
		rate_, _ := strconv.ParseInt(strings.TrimSpace(rate), 10, 32)
		if rate_ < 1400 {
			fmt.Println("Division 4")
		} else if rate_ < 1600 {
			fmt.Println("Division 3")
		} else if rate_ < 1900 {
			fmt.Println("Division 2")
		} else {
			fmt.Println("Division 1")
		}
	}
}

/*
func main() {
	/*	fmt.Println("HELLO PRO")
		var user string
		user = "ahmed"
		fmt.Println(user)
		fmt.Printf("Var Type: %T\n", user)

		var logged bool = true
		fmt.Println(logged)

		var num int = 15
		fmt.Println(num)

		fmt.Println(here)
*/

/*
	reader := bufio.NewReader(os.Stdin)
	input, _ := reader.ReadString('\n')
	//input2, _ := reader.ReadString('\n')

	num, err := strconv.ParseInt(strings.TrimSpace(input), 10, 64)
	//	num2, err := strconv.ParseFloat(strings.TrimSpace(input2), 64)
	num2 := strconv.FormatInt(num, 10)
	if err == nil {
		fmt.Printf("%s", num2)
	} else {
		fmt.Println(err)
	}

*/

/*
	var x int = 5
	var ptr *int = &x

	fmt.Println(ptr, *ptr)

*/

/*
	var x [3]int = [3]int{1, 2, 3}
	x[0] = 5

	fmt.Println(x)
*/

// Slices
/*
		var arr = []int{1, 3, 2, 4, 7}
		arr = append(arr[:2], arr[3:]...)

		var x User = User{"Ahmed", true}
		fmt.Println(x)

		if 7 > 5 && 3 < 5 || 2 > 3 {
			fmt.Printf("A")
		} else {
			fmt.Printf("B")
		}
	fmt.Println("HELLO")
	defer fmt.Println("1")
	defer fmt.Println("2")

}

type User struct {
	Name  string
	Email bool
}
*/

package main

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

var sc = bufio.NewScanner(os.Stdin)
var wr = bufio.NewWriter(os.Stdout)

func out(x ...interface{}) {
	fmt.Fprintln(wr, x...)
}

func next() string {
	sc.Scan()
	return sc.Text()
}

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

func nextInt64() int64 {
	i, e := strconv.ParseInt(next(), 10, 64)
	if e != nil {
		panic(e)
	}
	return i
}

func main() {
	defer wr.Flush()
	sc.Buffer(make([]byte, 0), 1000000009)
	sc.Split(bufio.ScanWords)

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

func solve() {
	rating := nextInt()

	if rating <= 1399 {
		out("Division 4")
	} else if rating <= 1599 {
		out("Division 3")
	} else if rating <= 1899 {
		out("Division 2")
	} else {
		out("Division 1")
	}
}

package main

import (
	"fmt"
)

func main() {
	var n int

	fmt.Scanf("%d", &n)
	for i := 0; i < n; i++ {
		var r int
		fmt.Scan(&r)
		switch {
		case r >= 1900:
			fmt.Println("Division", 1)
		case r <= 1899 && r >= 1600:
			fmt.Println("Division", 2)
		case r <= 1599 && r >= 1400:
			fmt.Println("Division", 3)
		case r <= 1399:
			fmt.Println("Division", 4)
		}
	}
}

package main

import "fmt"

func main() {
	var T int
	fmt.Scanln(&T)
	for Case:=0;Case<T;Case++{
		var a int
		fmt.Scanln(&a)
		if a <=1399{
			fmt.Println("Division 4")
		}else if(a<=1599){
			fmt.Println("Division 3")
		}else if (a<=1899){
			fmt.Println("Division 2")
		}else{
			fmt.Println("Division 1")
		}

	}
}

package main

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

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

func main(){
    defer writer.Flush()

    var n int
    fmt.Fscan(reader,&n)
    for i := 1; i <= n;i++ {
        var rating int
        fmt.Fscan(reader,&rating)
        div := 1
        if rating <= 1399 {
            div = 4
        } else if rating <= 1599 {
            div = 3
        } else if rating <= 1899 {
            div = 2
        }
        fmt.Printf("Division %d\n",div)
    }
}

// @Title
// @Description
// @Author
// @Update
package main

import (
        "fmt"
)

func main() {
        var n int
        fmt.Scanln(&n)
        for i := 0; i < n; i++ {
                var st int
                fmt.Scanln(&st)
                switch {
                case st <= 1399:
                        fmt.Println("Division 4")
                case st <= 1599:
                        fmt.Println("Division 3")
                case st <= 1899:
                        fmt.Println("Division 2")
                case st >= 1900:
                        fmt.Println("Division 1")
                }
        }
}

package main
import "fmt"

func solve() {
    var rating int
    fmt.Scanln(&rating)
    fmt.Print("Division ")
    if rating < 1400 {
        fmt.Println(4)
    } else if rating < 1600 {
        fmt.Println(3)
    } else if rating < 1900 {
        fmt.Println(2)
    } else {
        fmt.Println(1)
    }
}

func main() {
    var tc int
    fmt.Scanln(&tc)
    for i := 0; i < tc; i++ {
        solve()
    }
}

package main

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

func solve(cin *scanner, cout *writer, cerr *writer) {
	x := cin.NextInt()
	switch {
	case x <= 1399:
		cout.Println("Division 4")
	case x <= 1599:
		cout.Println("Division 3")
	case x <= 1899:
		cout.Println("Division 2")
	default:
		cout.Println("Division 1")
	}
}

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

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

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

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

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

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

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

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

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

type writer struct {
	w *bufio.Writer
}

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

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

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

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

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

// }}}

// vim: fdm=marker

package main

import (
	"fmt"
)

func main(){
	//var v []int = make([] int, 200000)
	var t int
	fmt.Scan(&t)
	for ;t>0; t--{
		var rating int
		//var toint [int]int
		//reader := bufio.NewReader(os.Stdin)
		//rating = reader.Read
		fmt.Scan(&rating)
		if rating >= 1900{
			fmt.Println("Division 1")
		}else if rating >= 1600{
			fmt.Println("Division 2")
		}else if rating >= 1400{
			fmt.Println("Division 3")
		}else{
			fmt.Println("Division 4")
		}
	}
}

package main

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

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

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

	var T, x int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &x)
		o := "Division "
		if x < 1400 {
			o += "4"
		} else if x < 1600 {
			o += "3"
		} else if x < 1900 {
			o += "2"
		} else {
			o += "1"
		}

		Fprintln(out, o)

	}
}

package main

import (
	"fmt"
)

func main() {
	var (
		t int
		r int
	)
	fmt.Scanf("%d\n", &t)
	for i := 0; i < t; i++ {
		fmt.Scanf("%d\n", &r)
		if r > 1899 {
			fmt.Println("Division 1")
		} else if r > 1599 {
			fmt.Println("Division 2")
		} else if r > 1399 {
			fmt.Println("Division 3")
		} else {
			fmt.Println("Division 4")
		}
	}
}

package main
import (
	"fmt"
)
func main() {
	var t int
	fmt.Scan(&t)
	for i:=0;i<t;i++ {
		var x int
		fmt.Scan(&x)
		if x >= 1900 {
			fmt.Println("Division 1")
		} else if x >= 1600 && x <= 1899 {
			fmt.Println("Division 2")
		} else if x >= 1400 && x <= 1599 {
			fmt.Println("Division 3")
		} else {
			fmt.Println("Division 4")
		}
	}
}

package main

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

var in = bufio.NewReader(os.Stdin)

func gcd(a, b int) int {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

func pl(a ...interface{})                { fmt.Println(a...) }
func pf(format string, a ...interface{}) { fmt.Printf(format, a...) }
func scan(a ...interface{})              { fmt.Fscan(in, a...) }

func solve() {
	var n int
	scan(&n)
	var d = 4
	if n >= 1900 {
		d = 1
	} else if n >= 1600 && n <= 1899 {
		d = 2
	} else if n >= 1400 && n <= 1599 {
		d = 3
	}
	pf("Division %d\n", d)
}

func main() {
	var T int
	scan(&T)
	for ; T > 0; T-- {
		solve()
	}
}

func ys(b bool) string { return map[bool]string{true: "YES", false: "NO"}[b] }

package main

import (
	"fmt"
	//"strconv"
)

func main() {
	var t int
	fmt.Scanf("%d\n", &t)
	for i := 0; i < t; i++ {
		var rating int
		fmt.Scanf("%d\n", &rating)
		if rating <= 1399 {
			fmt.Println("Division 4")
		} else if rating <= 1599 {
			fmt.Println("Division 3")
		} else if rating <= 1899 {
			fmt.Println("Division 2")
		} else {
			fmt.Println("Division 1")
		}
	}

	// Printing

    //fmt.Println(text)
	/*fmt.Println(Hello("Nerd"));

	// For loop + if condition

	for i := 0; i < 10; i++ {
		if i % 2 == 0 {
			fmt.Println(strconv.Itoa(i)); // int to an ASCII string is itoa
		}
	}

	var a int
	a = 3
	fmt.Print(a);

	var b [5]int
	fmt.Println("emp:", b) // returns emp: [0 0 0 0 0]
	b[3] = -2;
	fmt.Println("emp:", b, len(b)) // returns emp: [0 0 0 0 0]

	// You can't add strings to int, but keeping them as separate inputs as above works just as well
	var twoD [2][3]int
    for i := 0; i < 2; i++ {
        for j := 0; j < 3; j++ {
            twoD[i][j] = i + j
        }
    }
	fmt.Println("2d: ", twoD)*/

}

package main

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

func solve(r *bufio.Reader) {
	var n int
	fmt.Fscan(r, &n)
	switch {
	case n >= 1900:
		fmt.Println("Division 1")
	case n >= 1600:
		fmt.Println("Division 2")
	case n >= 1400:
		fmt.Println("Division 3")
	default:
		fmt.Println("Division 4")
	}
}
func main() {
	r := bufio.NewReader(os.Stdin)
	var n int
	fmt.Fscan(r, &n)
	for i := 0; i < n; i++ {
		solve(r)
	}
}

package main

import "fmt"

func main() {
	var t int
	var a int
	divi := []int{}

	fmt.Scanln(&t)
	r := []string{}
	for i := 0; i < t; i++ {
		fmt.Scanln(&a)
		divi = append(divi, a)
	}
	for i := 0; i < len(divi); i++ {
		if divi[i] <= 1399 {
			r = append(r, "Division 4")
		}
		if 1400 <= divi[i] && divi[i] <= 1599 {
			r = append(r, "Division 3")
		}
		if 1600 <= divi[i] && divi[i] <= 1899 {
			r = append(r, "Division 2")
		}
		if 1900 <= divi[i] {
			r = append(r, "Division 1")
		}

	}
	for i := 0; i < len(r); i++ {
		fmt.Println(r[i])
	}
}

package main

import "fmt"

func main() {
	var x, r int
	fmt.Scan(&x)
	for i := 0; i < x; i++ {
		fmt.Scan(&r)
		fmt.Print("Division ")
		switch {
		case r <= 1399:
			fmt.Print("4\n")
		case r <= 1599:
			fmt.Print("3\n")
		case r <= 1899:
			fmt.Print("2\n")
		case r >= 1900:
			fmt.Print("1\n")
		}
	}
}

package main

import "fmt"

func main() {
	var t int
	fmt.Scanln(&t)

	var nums = make([]int, t)
	for i := range nums {
		fmt.Scanln(&nums[i])
	}

	for i := range nums {
		switch {
		case nums[i] <= 1399:
			fmt.Println("Division 4")
		case 1400 <= nums[i] && nums[i] <= 1599:
			fmt.Println("Division 3")
		case 1600 <= nums[i] && nums[i] <= 1899:
			fmt.Println("Division 2")
		case 1900 <= nums[i]:
			fmt.Println("Division 1")
		}
	}

}

package main

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

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

	var t int
	for fmt.Fscan(in, &t); t > 0; t-- {
		var rating int
		fmt.Fscan(in, &rating)

		if rating <= 1399 {
			fmt.Fprintln(out, "Division 4")
			continue
		}

		if rating <= 1599 {
			fmt.Fprintln(out, "Division 3")
			continue
		}

		if rating <= 1899 {
			fmt.Fprintln(out, "Division 2")
			continue
		}

		fmt.Fprintln(out, "Division 1")
		/*
			Для 1-го дивизиона: 1900≤rating
			Для 2-го ивизиона: 1600≤rating≤1899
			Для 3-го дивизиона: 1400≤rating≤1599
			Для 4-го дивизиона: rating≤1399
		*/
	}
}

package main

import "fmt"

func f(rating int){
	if rating >= 1900 {
		fmt.Println("Division 1")
	}else if rating >= 1600{
		fmt.Println("Division 2")
	}else if rating >= 1400 {
		fmt.Println("Division 3")
	}else{
		fmt.Println("Division 4")
	}
}

func main() {
	var t int
	_, _ = fmt.Scan(&t)
	for i := 0;i < t;i ++{
		var rating int
		_, _ = fmt.Scan(&rating)
		f(rating)
	}
}

package main

import "fmt"

func main() {
	nIn, tempI := 0, 0

	fmt.Scan(&nIn)

	for i := 0; i < nIn; i++ {
		fmt.Scan(&tempI)

		div := 4

		if tempI >= 1900 {
			div = 1
		} else if tempI >= 1600 {
			div = 2
		} else if tempI >= 1400 {
			div = 3
		}

		fmt.Println("Division ", div)
	}
}

package main

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

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

func main() {
	defer out.Flush()
	var t int
	fmt.Fscan(in, &t)
	for ; t > 0; t-- {
		var rating int
		fmt.Fscan(in, &rating)
		div := 1
		if rating >= 1900 {
			div = 1
		} else if 1600 <= rating && rating <= 1899 {
			div = 2
		} else if 1400 <= rating && rating <= 1599 {
			div = 3
		} else {
			div = 4
		}
		fmt.Fprintln(out, "Division", div)
	}

}

package main

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

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

	var T, rating int
	for Fscan(in, &T);T > 0; T-- {
		Fprint(out, "Division ")
		if Fscan(in, &rating); rating >= 1900 {
			Fprintln(out, 1)
		} else if rating >= 1600 {
			Fprintln(out, 2)
		} else if rating >= 1400 {
			Fprintln(out, 3)
		} else {
			Fprintln(out, 4)
		}
	}
}

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

package main

import (
	"fmt"
)

func main() {
	var test_case int
	var rating int
	fmt.Scanln(&test_case)

	for i := 0; i < test_case; i++ {
		fmt.Scanln(&rating)

		if rating <= 1399 {
			fmt.Println("Division 4")
		} else if rating <= 1599 && rating >= 1400 {
			fmt.Println("Division 3")
		} else if rating <= 1899 && rating >= 1600 {
			fmt.Println("Division 2")
		} else if rating >= 1900 {
			fmt.Println("Division 1")
		}
	}
}

package main

import (
	"fmt"
	"os"
)

func main() {
	f, err := os.Open("inA.txt")
	if err != nil {
		f = os.Stdin
	}
	var t uint16
	_, _ = fmt.Fscanln(f, &t)
	for ; t > 0; t-- {
		var rating int16
		_, _ = fmt.Fscanln(f, &rating)
		switch {
		case rating < 1400:
			fmt.Println("Division", 4)
		case rating < 1600:
			fmt.Println("Division", 3)
		case rating < 1900:
			fmt.Println("Division", 2)
		default:
			fmt.Println("Division", 1)
		}
	}
}

package main

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

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

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

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

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

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

/**
Run solve the problem CF1669A
Date: 23/04/22
User: pepradere
URL: https://codeforces.com/problemset/problem/1669/A
Problem: CF1669A
**/
func (in *CF1669A) Run() {
	var ans strings.Builder
	for t := in.NextInt(); t > 0; t-- {
		r := in.NextInt()
		if r <= 1399 {
			ans.WriteString("Division 4\n")
		} else if r <= 1599 {
			ans.WriteString("Division 3\n")
		} else if r <= 1899{
			ans.WriteString("Division 2\n")
		} else {
			ans.WriteString("Division 1\n")
		}

	}
	fmt.Print(ans.String())
}

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

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

package main

import "fmt"

// 对于超过10的长度的字符串缩写
func suoxie(n int) {
	for i := 0; i < n; i++ {
		var s string
		fmt.Scanln(&s)
		a := len(s)
		// fmt.Println(s)
		// fmt.Println(s[0])
		if a > 10 {
			fmt.Print(string(s[0]))
			fmt.Print(a - 2)
			fmt.Println(string(s[a-1]))
		} else {
			fmt.Println(s)
		}
	}
}

// 三人中至少两人才做题
func teamSolveProblem(n int) {
	res := 0
	for i := 0; i < n; i++ {
		cnt := 0
		for j := 0; j < 3; j++ {
			var sc int
			fmt.Scan(&sc)
			if sc == 1 {
				cnt++
			}
		}
		if cnt >= 2 {
			res++
		}
	}
	fmt.Println(res)
}

// func nextRound(n, k int) {
// 	res, kth := k, -1
// 	var cur, last int
// 	fmt.Scanln(&last)
// 	end := false
// 	for i := 0; i < n; i++ {
// 		fmt.Scanln(&cur)
// 		if !end {

// 		}
// 	}
// 	fmt.Print(res)
// }
func main() {
	var n, k int
	fmt.Scanln(&n)
	// fmt.Scanln(&k)
	// nextRound(n, k)
	for i := 0; i < n; i++ {
		fmt.Scanln(&k)
		rate := 4
		if k >= 1900 {
			rate = 1
		} else if k >= 1600 {
			rate = 2
		} else if k >= 1400 {
			rate = 3
		}
		fmt.Print("Division ")
		fmt.Println(rate)
	}

	// return
}

package main

import "fmt"

func solve() {
	var rating int
	fmt.Scanln(&rating)
	switch {
	case rating >= 1900:
		fmt.Println("Division 1")
	case rating >= 1600 && rating <= 1899:
		fmt.Println("Division 2")
	case rating >= 1400 && rating <= 1599:
		fmt.Println("Division 3")
	case rating <= 1399:
		fmt.Println("Division 4")
	}
}

func main() {
	var t int
	fmt.Scanln(&t)
	for i := 0; i < t; i++ {
		solve()
	}
}

package main

import (
	"fmt"
	"os"
)

func readInt() int {
	var i int
	fmt.Fscan(os.Stdin, &i)
	return i
}

func main() {
	count := readInt()
	for i := 0; i < count; i++ {
		rating := readInt()
		if rating < 1400 {
			fmt.Println("Division 4")
		} else if rating < 1600 {
			fmt.Println("Division 3")
		} else if rating < 1900 {
			fmt.Println("Division 2")
		} else {
			fmt.Println("Division 1")
		}
	}
}

package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	// Toss first line
	scanner.Scan()

	for scanner.Scan() {
		var div int

		r, err := strconv.Atoi(scanner.Text())
		if err != nil {
			r = 0
		}

		switch {
		case r <= 1399:
			div = 4
		case 1400 <= r && r <= 1599:
			div = 3
		case 1600 <= r && r <= 1899:
			div = 2
		case 1900 <= r:
			div = 1
		}

		fmt.Printf("Division %d\n", div)
	}
}

package main

import "fmt"

func main() {
	var n, x int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		fmt.Scan(&x)

		fmt.Print("Division ")
		if x >= 1900 {
			fmt.Println(1)
		} else if x <= 1899 && x >= 1600 {
			fmt.Println(2)
		} else if x <= 1599 && x >= 1400 {
			fmt.Println(3)
		} else {
			fmt.Println(4)
		}
	}
}

package main

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

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

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

	t := 0
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		n := 0
		fmt.Fscan(in, &n)
		if n >= 1900 {
			fmt.Fprintln(out, "Division 1")
		} else if n <= 1899 && n >= 1600 {
			fmt.Fprintln(out, "Division 2")
		} else if n >= 1400 && n <= 1599 {
			fmt.Fprintln(out, "Division 3")
		} else if n <= 1399 {
			fmt.Fprintln(out, "Division 4")
		}
	}
}

package main

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

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

func Scan(a ...interface{}) { fmt.Fscan(in, a...) }
func Scanln(s *string) {
	for *s, _ = in.ReadString('\n'); *s == "\n"; {
		*s, _ = in.ReadString('\n')
	}
	*s = (*s)[:len(*s)-1]
}
func Print(a ...interface{})                 { fmt.Fprint(out, a...) }
func Printf(format string, a ...interface{}) { fmt.Fprintf(out, format, a...) }
func Log(a ...interface{}) {
	pc, _, line, _ := runtime.Caller(1)
	fmt.Fprint(out, "log ", runtime.FuncForPC(pc).Name(), ":", line, " ")
	fmt.Fprint(out, a...)
	fmt.Fprint(out, "\n")
}

func solve() {
	var n, r int
	Scan(&n)
	if n >= 1900 {
		r = 1
	} else if n >= 1600 {
		r = 2
	} else if n >= 1400 {
		r = 3
	} else {
		r = 4
	}
	Printf("Division %d\n", r)
}

func main() {
	defer out.Flush()

	T := 1
	Scan(&T)
	for test := 0; test < T; test++ {
		solve()
	}
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var N,a int
	fmt.Fscan(in, &N)
	for i := 0;i < N;i++{
		fmt.Fscan(in, &a)
		if a >= 1900{
			fmt.Println("Division 1")
		}else if a >= 1600{
			fmt.Println("Division 2")
		}else if a >= 1400{
			fmt.Println("Division 3")
		}else{
			fmt.Println("Division 4")
		}
	}
}

package main

import (
	"fmt"
)

func runCase(rating int) string {
	if rating <= 1399 {
		return "Division 4"
	}

	if rating <= 1599 {
		return "Division 3"
	}

	if rating <= 1899 {
		return "Division 2"
	}

	return "Division 1"
}

func main() {

	var n int
	fmt.Scanln("%d", &n)

	var nums = make([]int, n)
	for i := range nums {
		fmt.Scanln(&nums[i])
	}

	for i := 0; i < n; i++ {
		fmt.Printf("%s\n", runCase(nums[i]))
	}
}

package main

import (
	"fmt"
)

func runCase(rating int) string {
	if rating <= 1399 {
		return "Division 4"
	}

	if rating <= 1599 {
		return "Division 3"
	}

	if rating <= 1899 {
		return "Division 2"
	}

	return "Division 1"
}

func main() {

	var n int
	fmt.Scanf("%d", &n)

	for i := 0; i < n; i++ {
		var rating int
		fmt.Scanf("%d", &rating)
		fmt.Printf("%s\n", runCase(rating))
	}
}

package main

import (
	"fmt"
)

func runCase()  string {
	var rating int
	fmt.Scanf("%d", &rating)

	if rating <= 1399 {
		return "Division 4"
	}

	if rating <= 1599 {
		return "Division 3"
	}

	if rating <= 1899 {
		return "Division 2"
	}

	return "Division 1"
}

func main ()  {

	var n int
	fmt.Scanf("%d", &n)

	for i := 0  ; i < n; i++ {
		fmt.Printf("%s\n", runCase())
	}
}

package main

import "fmt"

func main() {
	var (
		testcases int
		input     int
		output    string = "Division "
	)
	fmt.Scan(&testcases)

	for testcases > 0 {
		testcases -= 1

		fmt.Scan(&input)
		if input >= 1900 {
			output += "1"
		} else if input > 1599 {
			output += "2"
		} else if input > 1399 {
			output += "3"
		} else {
			output += "4"
		}

		fmt.Println(output)
	}

}

package main

import "fmt"

func main() {
	var (
		testcases int
		input     int
		output    string = "Division "
	)
	fmt.Scan(&testcases)

	for testcases > 0 {
		testcases -= 1
        output = "Division "
		fmt.Scan(&input)
		if input > 1900 {
			output += "1"
		} else if input > 1599 {
			output += "2"
		} else if input > 1399 {
			output += "3"
		} else {
			output += "4"
		}

		fmt.Println(output)
	}

}

package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a)
	for i := 0; i < a; i++ {
		fmt.Scan(&b)
		if 1900 <= b {
			fmt.Print("Division 1")
		} else if 1600 <= b && b <= 1899 {
			fmt.Print("Division 2")
		} else if 1400 <= b && b <= 1599 {
			fmt.Print("Division 3")
		} else if b <= 1399 {
			fmt.Print("Division 4")
		}
	}
}

package main

import "fmt"

var division string = "Division"
func main(){
    var t int

    fmt.Scan(&t)
    var rating int

    for i:= 0; i<t; i++{
        fmt.Scan(&rating)
        fmt.Println(Rating(rating))
    }

}
func Rating(elo int) string{

    if(elo<=1399){
        return division + "4"
    }
    if(elo <= 1599){
        return division + "3"
    }
    if(elo<= 1899){
        return division + "2"
    }
    if(elo<= 1900){
        return division + "1"
    }
    return division
}

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	str, _ := reader.ReadString('\n')
	t, _ := strconv.ParseInt(strings.TrimSpace(str), 10, 32)
	tt := int(t)
	for i := 0; i < tt; i++ {
		rate, _ := reader.ReadString('\n')
		rate_, _ := strconv.ParseInt(strings.TrimSpace(rate), 10, 32)
		if rate_ < 1400 {
			fmt.Println("Divison 4")
		} else if rate_ < 1600 {
			fmt.Println("Divison 3")
		} else if rate_ < 1900 {
			fmt.Println("Divison 2")
		} else {
			fmt.Println("Divison 1")
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scanf("%d", &n)
	for i := 0; i < n; i++ {
		var r int
		fmt.Scanf("%d", &r)
		switch {
		case r >= 1900:
			fmt.Println("Division", 1)
		case r <= 1899 && r >= 1600:
			fmt.Println("Division", 2)
		case r <= 1599 && r >= 1400:
			fmt.Println("Division", 3)
		case r <= 1399:
			fmt.Println("Division", 4)
		}
	}
}

package main

import (
    "fmt"
)

func main(){
    var n int
    fmt.Scanf("%d",&n)
    for i := 1; i <= n;i++ {
        var rating int
        fmt.Scanf("%d",&rating)
        div := 1
        if rating <= 1399 {
            div = 4
        } else if rating <= 1599 {
            div = 3
        } else if rating <= 1899 {
            div = 2
        }
        fmt.Printf("Division %d\n",div)
    }
}

// @Title
// @Description
// @Author
// @Update
package main

import (
        "fmt"
)

func main() {
        var n int
        fmt.Scanln(&n)
        for i := 0; i < n; i++ {
                var st int
                fmt.Scanln(&st)
                switch {
                case st <= 1399:
                        fmt.Println("For Division 4")
                case st <= 1599:
                        fmt.Println("For Division 3")
                case st <= 1899:
                        fmt.Println("For Division 2")
                case st >= 1900:
                        fmt.Println("For Division 1")
                }
        }
}

package main
import "fmt"

func solve() {
    var rating int
    fmt.Scanln(&rating)
    fmt.Print("Divison ")
    if rating < 1400 {
        fmt.Println(4)
    } else if rating < 1600 {
        fmt.Println(3)
    } else if rating < 1900 {
        fmt.Println(2)
    } else {
        fmt.Println(1)
    }
}

func main() {
    var tc int
    fmt.Scanln(&tc)
    for i := 0; i < tc; i++ {
        solve()
    }
}

package main

import (
	"fmt"
)

func main(){
	var rating int
	//reader := bufio.NewReader(os.Stdin)
	//rating = reader.Read
	fmt.Scan(&rating)
	if rating >= 1900{
		fmt.Println("Division 1")
	}else if rating >= 1600{
		fmt.Println("Division 2")
	}else if rating >= 1400{
		fmt.Println("Division 3")
	}else{
		fmt.Println("Division 4")
	}
}

package main

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

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

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

	var T, x int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &x)
		o := "Division "
		if x < 1400 {
			o += "1"
		} else if x < 1600 {
			o += "2"
		} else if x < 1900 {
			o += "3"
		} else {
			o += "4"
		}

		Fprintln(out, o)

	}
}


package main

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

const (
  INF = 1234567890
)

func Init() {
}

func Solve(io *FastIO) {
	N := io.NextInt()
	M := io.NextInt()
	K := io.NextInt()

	S := make([]string, N)
	for i := range S {
	  S[i] = io.NextLine()
	}

	skips := MakeIntMatrix(N, M + 1)
	for ln, line := range S {
	  total := 0
	  for _, c := range line {
	    if c == '1' {
	      total++
	    }
	  }
	 // fmt.Printf("ln = %d, line = %s, total = %d\n", ln, line, total)
	  FillIntArray(skips[ln], INF)
	  for i := 0; i < M; i++ {
	    classes := 0
	    for j := i; j < M; j++ {
	      if line[j] == '1' {
	        classes++
	        skipped := total - classes
	       // fmt.Println(i, j, total, classes, skipped)
	        skips[ln][skipped] = Min(skips[ln][skipped], j - i + 1)
	      }
	    }
	  }
	  for i := 0; i <= M; i++ {
	    if skips[ln][i] == INF {
	      skips[ln][i] = 0
	    }
	  }
    // fmt.Println(ln, skips[ln])
	}

	dp := make([]int, K + 1)
	FillIntArray(dp, INF)
	dp[0] = 0
	for i := 0; i < N; i++ {
	  next := make([]int, K + 1)
	  FillIntArray(next, INF)
	  for j := 0; j <= K; j++ {
	    for k := 0; j + k <= K && k <= M; k++ {
	     // fmt.Println(i, j, k, len(skips), len(dp), len(next))
	      next[j + k] = Min(next[j + k], dp[j] + skips[i][k])
	     // fmt.Printf("i = %d, j = %d, k = %d, next = %d\n", i, j, k, next[j + k])
	    }
	  }
	  dp = next
	 // fmt.Println(i, dp)
	}

	best := INF
	for i := 0; i <= K; i++ {
	  best = Min(best, dp[i])
	}
	io.Println(best)
}

func MakeIntMatrix(rows, cols int) [][]int {
	mat := make([][]int, rows)
	for i := range mat {
		mat[i] = make([]int, cols)
	}
	return mat
}

func Min(args ...int) int {
	min := args[0]
	for i := 1; i < len(args); i++ {
		if args[i] < min {
			min = args[i]
		}
	}
	return min
}

func FillIntArray(arr []int, val int) {
	for i := range arr {
		arr[i] = val
	}
}

type FastIO struct {
	reader *bufio.Reader
	writer *bufio.Writer
}

func (io *FastIO) NextChar() byte {
	c, _ := io.reader.ReadByte()
	return c
}

func (io *FastIO) NextInt() int {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := 1
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := 0
	for !IsSpaceChar(c) {
		res = (res * 10) + int(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextLong() int64 {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := int64(1)
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := int64(0)
	for !IsSpaceChar(c) {
		res = (res * 10) + int64(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextIntArray(size int) []int {
	return io.NextIntArrayOffset(size, 0)
}

func (io *FastIO) NextIntArrayOffset(size, offset int) []int {
	arr := make([]int, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextInt()
	}
	return arr
}

func (io *FastIO) NextLongArray(size int) []int64 {
	return io.NextLongArrayOffset(size, 0)
}

func (io *FastIO) NextLongArrayOffset(size, offset int) []int64 {
	arr := make([]int64, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextLong()
	}
	return arr
}

func (io *FastIO) NextString() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsSpaceChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) NextLine() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsLineBreakChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) Println(args ...interface{}) {
	io.writer.WriteString(fmt.Sprintln(args...))
}

func (io *FastIO) Printf(format string, args ...interface{}) {
	io.writer.WriteString(fmt.Sprintf(format, args...))
}

func (io *FastIO) FlushOutput() {
	io.writer.Flush()
}

func IsSpaceChar(c byte) bool {
	switch c {
	case 0, '\t', '\n', '\r', ' ':
		return true
	default:
		return false
	}
}

func IsLineBreakChar(c byte) bool {
	switch c {
		case 0, '\n', '\r':
			return true
		default:
			return false
	}
}

func main() {
	io := FastIO{reader: bufio.NewReader(os.Stdin), writer: bufio.NewWriter(os.Stdout)}
	Init()
	Solve(&io)
	io.FlushOutput()
}

package main

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

const (
  INF = 1234567890
)

func Init() {
}

func Solve(io *FastIO) {
	N := io.NextInt()
	M := io.NextInt()
	K := io.NextInt()

	S := make([]string, N)
	for i := range S {
	  S[i] = io.NextLine()
	}

	skips := MakeIntMatrix(N, M + 1)
	for ln, line := range S {
	  total := 0
	  for _, c := range line {
	    if c == '1' {
	      total++
	    }
	  }
	  FillIntArray(skips[ln], INF)
	  for i := 0; i < M; i++ {
	    classes := 0
	    for j := i; j < M; j++ {
	      if line[j] == '1' {
	        classes++
	        skipped := total - classes
	        skips[ln][skipped] = Min(skips[ln][skipped], j - i + 1)
	      }
	    }
	  }
	  for i := 0; i <= M; i++ {
	    if skips[ln][i] == INF {
	      skips[ln][i] = 0
	    }
	  }
	}

	dp := make([]int, K + 1)
	FillIntArray(dp, INF)
	dp[0] = 0
	for i := 0; i < N; i++ {
	  next := make([]int, K + 1)
	  FillIntArray(next, INF)
	  for j := 0; j <= K; j++ {
	    for k := 0; j + k <= K && k <= M; k++ {
	      next[j + k] = Min(next[j + k], dp[j] + skips[i][k])
	    }
	  }
	  dp = next
	}

	best := INF
	for i := 0; i <= K; i++ {
	  best = Min(best, dp[i])
	}
	io.Println(best)
}

func MakeIntMatrix(rows, cols int) [][]int {
	mat := make([][]int, rows)
	for i := range mat {
		mat[i] = make([]int, cols)
	}
	return mat
}

func Min(args ...int) int {
	min := args[0]
	for i := 1; i < len(args); i++ {
		if args[i] < min {
			min = args[i]
		}
	}
	return min
}

func FillIntArray(arr []int, val int) {
	for i := range arr {
		arr[i] = val
	}
}

type FastIO struct {
	reader *bufio.Reader
	writer *bufio.Writer
}

func (io *FastIO) NextChar() byte {
	c, _ := io.reader.ReadByte()
	return c
}

func (io *FastIO) NextInt() int {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := 1
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := 0
	for !IsSpaceChar(c) {
		res = (res * 10) + int(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextLong() int64 {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := int64(1)
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := int64(0)
	for !IsSpaceChar(c) {
		res = (res * 10) + int64(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextIntArray(size int) []int {
	return io.NextIntArrayOffset(size, 0)
}

func (io *FastIO) NextIntArrayOffset(size, offset int) []int {
	arr := make([]int, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextInt()
	}
	return arr
}

func (io *FastIO) NextLongArray(size int) []int64 {
	return io.NextLongArrayOffset(size, 0)
}

func (io *FastIO) NextLongArrayOffset(size, offset int) []int64 {
	arr := make([]int64, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextLong()
	}
	return arr
}

func (io *FastIO) NextString() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsSpaceChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) NextLine() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsLineBreakChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) Println(args ...interface{}) {
	io.writer.WriteString(fmt.Sprintln(args...))
}

func (io *FastIO) Printf(format string, args ...interface{}) {
	io.writer.WriteString(fmt.Sprintf(format, args...))
}

func (io *FastIO) FlushOutput() {
	io.writer.Flush()
}

func IsSpaceChar(c byte) bool {
	switch c {
	case 0, '\t', '\n', '\r', ' ':
		return true
	default:
		return false
	}
}

func IsLineBreakChar(c byte) bool {
	switch c {
		case 0, '\n', '\r':
			return true
		default:
			return false
	}
}

func main() {
	io := FastIO{reader: bufio.NewReader(os.Stdin), writer: bufio.NewWriter(os.Stdout)}
	Init()
	Solve(&io)
	io.FlushOutput()
}

package main

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

const (
	MaxN = 512
	MaxK = 512
	Inf  = MaxN * MaxK
)

var n, m, k int
var f, dp [MaxN][MaxK]int

func main() {
	buf := bufio.NewReader(os.Stdin)
	fmt.Fscanf(buf, "%d %d %d\n", &n, &m, &k)
	for i := 0; i < n; i++ {
		var tmp string
		fmt.Fscanf(buf, "%s\n", &tmp)
		t := make([]int, 0)
		for j := 0; j < m; j++ {
			if tmp[j] == '1' {
				t = append(t, j)
			}
		}
		tlen := len(t)
		if tlen > 0 {
			for k1 := 0; k1 < tlen; k1++ {
				f[i][k1] = Inf
			}
			for k1 := 0; k1 < tlen; k1++ {
				for x := 0; x <= k1; x++ {
					y := tlen - (k1 - x) - 1
					m := t[y] - t[x] + 1
					if f[i][k1] > m {
						f[i][k1] = m
					}
				}
			}
		}
	}

	for i := 0; i <= n; i++ {
		for j := 0; j <= k; j++ {
			dp[i][j] = Inf
		}
	}

	dp[0][0] = 0
	for i := 1; i <= n; i++ {
		for j := 0; j <= k; j++ {
			for l := 0; l <= j; l++ {
				t := dp[i-1][j-l] + f[i-1][l]
				if dp[i][j] > t {
					dp[i][j] = t
				}
			}
		}
	}

	fmt.Println(dp[n][k])
}

package main

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

const (
  INF = 1234567890
)

func Init() {
}

func Solve(io *FastIO) {
	N := io.NextInt()
	M := io.NextInt()
	K := io.NextInt()

	S := make([]string, N)
	for i := range S {
	  S[i] = io.NextLine()
	}

	skips := MakeIntMatrix(N, M + 1)
	for ln, line := range S {
	  total := 0
	  for _, c := range line {
	    if c == '1' {
	      total++
	    }
	  }
	 // fmt.Printf("ln = %d, line = %s, total = %d\n", ln, line, total)
	  FillIntArray(skips[ln], INF)
	  for i := 0; i < M; i++ {
	    classes := 0
	    for j := i; j < M; j++ {
	      if line[j] == '1' {
	        classes++
	        skipped := total - classes
	       // fmt.Println(i, j, total, classes, skipped)
	        skips[ln][skipped] = Min(skips[ln][skipped], j - i + 1)
	      }
	    }
	  }
	  for i := 0; i <= M; i++ {
	    if skips[ln][i] == INF {
	      skips[ln][i] = 0
	    }
	  }
    // fmt.Println(ln, skips[ln])
	}

	dp := make([]int, K + 1)
	FillIntArray(dp, INF)
	dp[0] = 0
	for i := 0; i < N; i++ {
	  next := make([]int, K + 1)
	  FillIntArray(next, INF)
	  for j := 0; j <= M && j <= K; j++ {
	    for k := 0; j + k <= K && k <= M; k++ {
	     // fmt.Println(i, j, k, len(skips), len(dp), len(next))
	      next[j + k] = Min(next[j + k], dp[j] + skips[i][k])
	     // fmt.Printf("i = %d, j = %d, k = %d, next = %d\n", i, j, k, next[j + k])
	    }
	  }
	  dp = next
	 // fmt.Println(i, dp)
	}

	best := INF
	for i := 0; i <= K; i++ {
	  best = Min(best, dp[i])
	}
	io.Println(best)
}

func MakeIntMatrix(rows, cols int) [][]int {
	mat := make([][]int, rows)
	for i := range mat {
		mat[i] = make([]int, cols)
	}
	return mat
}

func Min(args ...int) int {
	min := args[0]
	for i := 1; i < len(args); i++ {
		if args[i] < min {
			min = args[i]
		}
	}
	return min
}

func FillIntArray(arr []int, val int) {
	for i := range arr {
		arr[i] = val
	}
}

type FastIO struct {
	reader *bufio.Reader
	writer *bufio.Writer
}

func (io *FastIO) NextChar() byte {
	c, _ := io.reader.ReadByte()
	return c
}

func (io *FastIO) NextInt() int {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := 1
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := 0
	for !IsSpaceChar(c) {
		res = (res * 10) + int(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextLong() int64 {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := int64(1)
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := int64(0)
	for !IsSpaceChar(c) {
		res = (res * 10) + int64(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextIntArray(size int) []int {
	return io.NextIntArrayOffset(size, 0)
}

func (io *FastIO) NextIntArrayOffset(size, offset int) []int {
	arr := make([]int, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextInt()
	}
	return arr
}

func (io *FastIO) NextLongArray(size int) []int64 {
	return io.NextLongArrayOffset(size, 0)
}

func (io *FastIO) NextLongArrayOffset(size, offset int) []int64 {
	arr := make([]int64, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextLong()
	}
	return arr
}

func (io *FastIO) NextString() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsSpaceChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) NextLine() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsLineBreakChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) Println(args ...interface{}) {
	io.writer.WriteString(fmt.Sprintln(args...))
}

func (io *FastIO) Printf(format string, args ...interface{}) {
	io.writer.WriteString(fmt.Sprintf(format, args...))
}

func (io *FastIO) FlushOutput() {
	io.writer.Flush()
}

func IsSpaceChar(c byte) bool {
	switch c {
	case 0, '\t', '\n', '\r', ' ':
		return true
	default:
		return false
	}
}

func IsLineBreakChar(c byte) bool {
	switch c {
		case 0, '\n', '\r':
			return true
		default:
			return false
	}
}

func main() {
	io := FastIO{reader: bufio.NewReader(os.Stdin), writer: bufio.NewWriter(os.Stdout)}
	Init()
	Solve(&io)
	io.FlushOutput()
}


package main

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

type Scanner struct {
	bScanner *bufio.Scanner
}

func NewScanner() *Scanner {
	bScanner := bufio.NewScanner(os.Stdin)
	bScanner.Split(bufio.ScanWords)
	bScanner.Buffer([]byte{}, math.MaxInt32)
	return &Scanner{
		bScanner,
	}
}
func (s *Scanner) Next() string {
	s.bScanner.Scan()
	return s.bScanner.Text()
}
func (s *Scanner) NextInt() int {
	s.bScanner.Scan()
	res, err := strconv.Atoi(s.bScanner.Text())
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInt64() int64 {
	s.bScanner.Scan()
	res, err := strconv.ParseInt(s.bScanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextFloat() float64 {
	s.bScanner.Scan()
	res, err := strconv.ParseFloat(s.bScanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInts(N int) []int {
	res := make([]int, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt()
	}
	return res
}
func (s *Scanner) NextInt64s(N int) []int64 {
	res := make([]int64, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt64()
	}
	return res
}
func Min(nums ...int) int {
	ans := math.MaxInt32
	for _, num := range nums {
		if num < ans {
			ans = num
		}
	}
	return ans
}
func Max(nums ...int) int {
	ans := math.MinInt32
	for _, num := range nums {
		if num > ans {
			ans = num
		}
	}
	return ans
}

func InitInts1D(n int, val int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = val
	}
	return res
}
func InitInts2D(n, m int, val int) [][]int {
	res := make([][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts1D(m, val)
	}
	return res
}
func InitInts3D(n, m, k int, val int) [][][]int {
	res := make([][][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts2D(m, k, val)
	}
	return res
}

const (
	inf = 1000000000
)

var (
	wrow [][]int
	wcol [][]int
	dist [][][]int
	dr   = []int{1, 0, -1, 0}
	dc   = []int{0, 1, 0, -1}
)

func main() {
	sc := NewScanner()
	wr := bufio.NewWriter(os.Stdout)
	defer wr.Flush()

	N := sc.NextInt()
	M := sc.NextInt()
	K := sc.NextInt()

	wrow = make([][]int, N)
	wcol = make([][]int, N-1)
	for i := 0; i < N; i++ {
		wrow[i] = sc.NextInts(M - 1)
	}
	for i := 0; i < N-1; i++ {
		wcol[i] = sc.NextInts(M)
	}

	ans := InitInts2D(N, M, -1)
	if K%2 == 0 {
		dist = InitInts3D(N, M, K/2+1, 0)
		for k := 1; k <= K/2; k++ {
			for i := 0; i < N; i++ {
				for j := 0; j < M; j++ {
					dist[i][j][k] = inf

					for l := 0; l < 4; l++ {
						ii := i + dr[l]
						jj := j + dc[l]
						if 0 <= ii && ii < N && 0 <= jj && jj < M {
							w := 0
							if dr[l] != 0 {
								w = wcol[Min(i, ii)][jj]
							} else if dc[l] != 0 {
								w = wrow[ii][Min(j, jj)]
							}
							dist[i][j][k] = Min(dist[i][j][k], dist[ii][jj][k-1]+w)
						}
					}
				}
			}
		}

		for i := 0; i < N; i++ {
			for j := 0; j < M; j++ {
				ans[i][j] = 2 * dist[i][j][K/2]
			}
		}
	}

	for i := 0; i < N; i++ {
		for j := 0; j < M; j++ {
			fmt.Fprint(wr, ans[i][j], " ")
		}
		fmt.Fprintln(wr)
	}
}

package main

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

// github.com/EndlessCheng/codeforces-go
func CF1517D(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	type edge struct{ x, y, wt int }

	var n, m, k, wt int
	Fscan(in, &n, &m, &k)
	if k&1 > 0 {
		for s := strings.Repeat("-1 ", m); n > 0; n-- {
			Fprintln(out, s)
		}
		return
	}
	k /= 2
	g := make([][][]edge, n)
	for i := range g {
		g[i] = make([][]edge, m)
		for j := 1; j < m; j++ {
			Fscan(in, &wt)
			g[i][j-1] = append(g[i][j-1], edge{i, j, wt})
			g[i][j] = append(g[i][j], edge{i, j - 1, wt})
		}
	}
	for i := 1; i < n; i++ {
		for j := 0; j < m; j++ {
			Fscan(in, &wt)
			g[i-1][j] = append(g[i-1][j], edge{i, j, wt})
			g[i][j] = append(g[i][j], edge{i - 1, j, wt})
		}
	}

	dp := make([][][]int, n)
	for i := range dp {
		dp[i] = make([][]int, m)
		for j := range dp[i] {
			dp[i][j] = make([]int, k+1)
			for k := range dp[i][j] {
				dp[i][j][k] = -1
			}
		}
	}
	var f func(x, y, k int) int
	f = func(x, y, k int) (res int) {
		if k == 0 {
			return
		}
		dv := &dp[x][y][k]
		if *dv != -1 {
			return *dv
		}
		defer func() { *dv = res }()
		res = 1e9
		for _, e := range g[x][y] {
			if r := f(e.x, e.y, k-1) + e.wt; r < res {
				res = r
			}
		}
		return
	}
	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			Fprint(out, f(i, j, k)*2, " ")
		}
		Fprintln(out)
	}
}

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

package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"math"
	"os"
	"strconv"
)

type Scanner struct {
	bScanner *bufio.Scanner
}

func NewScanner() *Scanner {
	bScanner := bufio.NewScanner(os.Stdin)
	bScanner.Split(bufio.ScanWords)
	bScanner.Buffer([]byte{}, math.MaxInt32)
	return &Scanner{
		bScanner,
	}
}
func (s *Scanner) Next() string {
	s.bScanner.Scan()
	return s.bScanner.Text()
}
func (s *Scanner) NextInt() int {
	s.bScanner.Scan()
	res, err := strconv.Atoi(s.bScanner.Text())
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInt64() int64 {
	s.bScanner.Scan()
	res, err := strconv.ParseInt(s.bScanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextFloat() float64 {
	s.bScanner.Scan()
	res, err := strconv.ParseFloat(s.bScanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInts(N int) []int {
	res := make([]int, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt()
	}
	return res
}
func (s *Scanner) NextInt64s(N int) []int64 {
	res := make([]int64, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt64()
	}
	return res
}
func Min(nums ...int) int {
	ans := math.MaxInt32
	for _, num := range nums {
		if num < ans {
			ans = num
		}
	}
	return ans
}
func Max(nums ...int) int {
	ans := math.MinInt32
	for _, num := range nums {
		if num > ans {
			ans = num
		}
	}
	return ans
}

func InitInts1D(n int, val int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = val
	}
	return res
}
func InitInts2D(n, m int, val int) [][]int {
	res := make([][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts1D(m, val)
	}
	return res
}
func InitInts3D(n, m, k int, val int) [][][]int {
	res := make([][][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts2D(m, k, val)
	}
	return res
}

type StepState struct {
	step, dist int
	row, col   int
}
type PriorityQueue []*StepState

func (pq PriorityQueue) Len() int { return len(pq) }
func (pq PriorityQueue) Less(i, j int) bool {
	if pq[i].step != pq[j].step {
		return pq[i].step < pq[j].step
	}
	return pq[i].dist < pq[j].dist
}
func (pq PriorityQueue) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
}
func (pq *PriorityQueue) Push(x interface{}) {
	item := x.(*StepState)
	*pq = append(*pq, item)
}
func (pq *PriorityQueue) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	*pq = old[0 : n-1]
	return item
}

const (
	inf = 1000000000
)

var (
	wrow [][]int
	wcol [][]int
	dist [][][]int
	dr   = []int{1, 0, -1, 0}
	dc   = []int{0, 1, 0, -1}
)

func main() {
	sc := NewScanner()
	wr := bufio.NewWriter(os.Stdout)
	defer wr.Flush()

	n := sc.NextInt()
	m := sc.NextInt()
	k := sc.NextInt()

	wrow = make([][]int, n)
	wcol = make([][]int, n-1)
	for i := 0; i < n; i++ {
		wrow[i] = sc.NextInts(m - 1)
	}
	for i := 0; i < n-1; i++ {
		wcol[i] = sc.NextInts(m)
	}

	ans := InitInts2D(n, m, -1)
	if k%2 == 0 {
		dist = InitInts3D(n, m, k, inf)

		for i := 0; i < n; i++ {
			for j := 0; j < m; j++ {
				ans[i][j] = inf

				trace := make([]*StepState, 0)
				pq := PriorityQueue{&StepState{step: 0, dist: 0, row: i, col: j}}
				for len(pq) > 0 {
					from := heap.Pop(&pq).(*StepState)
					if dist[from.row][from.col][from.step] < from.dist {
						continue
					}
					// fmt.Fprintln(wr, from)

					if from.step == k/2 {
						ans[i][j] = 2 * from.dist
						for _, stepState := range trace {
							dist[stepState.row][stepState.col][stepState.step] = inf
						}
						pq = nil
						break
					}

					for k := 0; k < 4; k++ {
						to := &StepState{step: from.step + 1, dist: inf, row: from.row + dr[k], col: from.col + dc[k]}
						if 0 <= to.row && to.row < n && 0 <= to.col && to.col < m {
							if dr[k] != 0 {
								to.dist = from.dist + wcol[Min(from.row, to.row)][to.col]
							} else if dc[k] != 0 {
								to.dist = from.dist + wrow[to.row][Min(from.col, to.col)]
							}

							if dist[to.row][to.col][to.step] > to.dist {
								dist[to.row][to.col][to.step] = to.dist
								pq = append(pq, to)
								trace = append(trace, to)
							}
						}
					}
				}
			}
		}
	}

	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			fmt.Fprint(wr, ans[i][j], " ")
		}
		fmt.Fprintln(wr)
	}
}

package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"math"
	"os"
	"strconv"
)

type Scanner struct {
	bScanner *bufio.Scanner
}

func NewScanner() *Scanner {
	bScanner := bufio.NewScanner(os.Stdin)
	bScanner.Split(bufio.ScanWords)
	bScanner.Buffer([]byte{}, math.MaxInt32)
	return &Scanner{
		bScanner,
	}
}
func (s *Scanner) Next() string {
	s.bScanner.Scan()
	return s.bScanner.Text()
}
func (s *Scanner) NextInt() int {
	s.bScanner.Scan()
	res, err := strconv.Atoi(s.bScanner.Text())
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInt64() int64 {
	s.bScanner.Scan()
	res, err := strconv.ParseInt(s.bScanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextFloat() float64 {
	s.bScanner.Scan()
	res, err := strconv.ParseFloat(s.bScanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInts(N int) []int {
	res := make([]int, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt()
	}
	return res
}
func (s *Scanner) NextInt64s(N int) []int64 {
	res := make([]int64, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt64()
	}
	return res
}
func Min(nums ...int) int {
	ans := math.MaxInt32
	for _, num := range nums {
		if num < ans {
			ans = num
		}
	}
	return ans
}
func Max(nums ...int) int {
	ans := math.MinInt32
	for _, num := range nums {
		if num > ans {
			ans = num
		}
	}
	return ans
}

func InitInts1D(n int, val int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = val
	}
	return res
}
func InitInts2D(n, m int, val int) [][]int {
	res := make([][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts1D(m, val)
	}
	return res
}
func InitInts3D(n, m, k int, val int) [][][]int {
	res := make([][][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts2D(m, k, val)
	}
	return res
}

type StepState struct {
	step, dist int
	row, col   int
}
type PriorityQueue []*StepState

func (pq PriorityQueue) Len() int { return len(pq) }
func (pq PriorityQueue) Less(i, j int) bool {
	if pq[i].step != pq[j].step {
		return pq[i].step < pq[j].step
	}
	return pq[i].dist < pq[j].dist
}
func (pq PriorityQueue) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
}
func (pq *PriorityQueue) Push(x interface{}) {
	item := x.(*StepState)
	*pq = append(*pq, item)
}
func (pq *PriorityQueue) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	*pq = old[0 : n-1]
	return item
}

const (
	inf = 1000000000
)

var (
	wrow [][]int
	wcol [][]int
	dist [][][]int
	dr   = []int{1, 0, -1, 0}
	dc   = []int{0, 1, 0, -1}
)

func main() {
	sc := NewScanner()
	wr := bufio.NewWriter(os.Stdout)
	defer wr.Flush()

	n := sc.NextInt()
	m := sc.NextInt()
	k := sc.NextInt()

	wrow = make([][]int, n)
	wcol = make([][]int, n-1)
	for i := 0; i < n; i++ {
		wrow[i] = sc.NextInts(m - 1)
	}
	for i := 0; i < n-1; i++ {
		wcol[i] = sc.NextInts(m)
	}

	ans := InitInts2D(n, m, -1)
	if k%2 == 0 {
		dist = InitInts3D(n, m, k, inf)

		for i := 0; i < n; i++ {
			for j := 0; j < m; j++ {
				ans[i][j] = inf

				trace := make([]*StepState, 0)
				pq := PriorityQueue{&StepState{step: 0, dist: 0, row: i, col: j}}
				for len(pq) > 0 {
					from := heap.Pop(&pq).(*StepState)
					if dist[from.row][from.col][from.step] < from.dist {
						continue
					}
					// fmt.Fprintln(wr, from)

					trace = append(trace, from)

					if from.step == k/2 {
						ans[i][j] = 2 * from.dist
						for _, stepState := range trace {
							dist[stepState.row][stepState.col][stepState.step] = inf
						}
						pq = nil
						break
					}

					for k := 0; k < 4; k++ {
						to := &StepState{step: from.step + 1, dist: inf, row: from.row + dr[k], col: from.col + dc[k]}
						if 0 <= to.row && to.row < n && 0 <= to.col && to.col < m {
							if dr[k] != 0 {
								to.dist = from.dist + wcol[Min(from.row, to.row)][to.col]
							} else if dc[k] != 0 {
								to.dist = from.dist + wrow[to.row][Min(from.col, to.col)]
							}

							if dist[to.row][to.col][to.step] > to.dist {
								dist[to.row][to.col][to.step] = to.dist
								pq = append(pq, to)
							}
						}
					}
				}
			}
		}
	}

	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			fmt.Fprint(wr, ans[i][j], " ")
		}
		fmt.Fprintln(wr)
	}
}

package main

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

type Scanner struct {
	bScanner *bufio.Scanner
}

func NewScanner() *Scanner {
	bScanner := bufio.NewScanner(os.Stdin)
	bScanner.Split(bufio.ScanWords)
	bScanner.Buffer([]byte{}, math.MaxInt32)
	return &Scanner{
		bScanner,
	}
}
func (s *Scanner) Next() string {
	s.bScanner.Scan()
	return s.bScanner.Text()
}
func (s *Scanner) NextInt() int {
	s.bScanner.Scan()
	res, err := strconv.Atoi(s.bScanner.Text())
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInt64() int64 {
	s.bScanner.Scan()
	res, err := strconv.ParseInt(s.bScanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextFloat() float64 {
	s.bScanner.Scan()
	res, err := strconv.ParseFloat(s.bScanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInts(N int) []int {
	res := make([]int, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt()
	}
	return res
}
func (s *Scanner) NextInt64s(N int) []int64 {
	res := make([]int64, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt64()
	}
	return res
}
func Min(nums ...int) int {
	ans := math.MaxInt32
	for _, num := range nums {
		if num < ans {
			ans = num
		}
	}
	return ans
}
func Max(nums ...int) int {
	ans := math.MinInt32
	for _, num := range nums {
		if num > ans {
			ans = num
		}
	}
	return ans
}

func InitInts1D(n int, val int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = val
	}
	return res
}
func InitInts2D(n, m int, val int) [][]int {
	res := make([][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts1D(m, val)
	}
	return res
}
func InitInts3D(n, m, k int, val int) [][][]int {
	res := make([][][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts2D(m, k, val)
	}
	return res
}

const (
	inf  = 1000000000
	maxn = 100005
)

var (
	n, q                 int
	arr, smallestDivider []int
	memo                 [][]int
)

func primeFacts(num int) []int {
	result := make([]int, 0)
	for num > 1 {
		curSmallestDivider := smallestDivider[num]
		if len(result) == 0 || result[len(result)-1] != curSmallestDivider {
			result = append(result, curSmallestDivider)
		}
		num /= curSmallestDivider
	}
	return result
}

func main() {
	sc := NewScanner()
	wr := bufio.NewWriter(os.Stdout)
	defer wr.Flush()

	smallestDivider = InitInts1D(maxn, -1)
	for i := 2; i < maxn; i++ {
		if smallestDivider[i] != -1 {
			continue
		}
		smallestDivider[i] = i
		for j := int64(i) * int64(i); j < maxn; j += int64(i) {
			if smallestDivider[j] == -1 {
				smallestDivider[j] = i
			}
		}
	}

	n = sc.NextInt()
	q = sc.NextInt()
	arr = sc.NextInts(n)

	idxPrime := make([][]int, maxn)
	memo = InitInts2D(n+5, 20, n)
	memo[n][0] = n
	for i := n - 1; i >= 0; i-- {
		curPrimeFacts := primeFacts(arr[i])

		minStartIdx := n
		for _, primeFact := range curPrimeFacts {
			curIdxPrime := idxPrime[primeFact]
			if len(curIdxPrime) > 0 {
				minStartIdx = Min(minStartIdx, curIdxPrime[len(curIdxPrime)-1])
			}
			curIdxPrime = append(curIdxPrime, i)
			idxPrime[primeFact] = curIdxPrime
		}
		memo[i][0] = Min(minStartIdx, memo[i+1][0])
	}

	for i := 1; i < 20; i++ {
		for j := 0; j < n; j++ {
			memo[j][i] = memo[memo[j][i-1]][i-1]
		}
	}

	for i := 0; i < q; i++ {
		l := sc.NextInt()
		r := sc.NextInt()
		l--
		r--

		now := l
		ans := 0
		for j := 19; j >= 0; j-- {
			if memo[now][j] <= r {
				now = memo[now][j]
				ans += (1 << j)
			}
		}
		ans++
		fmt.Fprintln(wr, ans)
	}

}


package main

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

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 := nextInt()
	a := make([][]int, 2)
	b := make([]int, n)
	c := make([]int, n)
	totalTime := 0

	for i := range a {
		a[i] = make([]int, n-1)

		for j := range a[i] {
			a[i][j] = nextInt()
			if i == 1 {
				totalTime += a[i][j]
			}
		}
	}

	for i := range b {
		b[i] = nextInt()
	}

	for i := range b {
		if i > 0 {
			totalTime += a[0][i-1] - b[i-1] - a[1][i-1]
		}

		totalTime += b[i]

		c[i] = totalTime
	}

	sort.Ints(c)
	println(c[0] + c[1])
}

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

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

func nextInt64() int64 {
	n, _ := strconv.ParseInt(next(), 0, 64)
	return n
}

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 print(a ...interface{})                 { fmt.Fprint(writer, a...) }
func printf(format string, a ...interface{}) { fmt.Fprintf(writer, format, a...) }

package main

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

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

func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func getLine2Int() (n int) {
	scanf("%d\n", &n)
	return
}
func getLine2Ints(n int) []int {
	ans := make([]int, n)
	for i := 0; i < n-1; i++ {
		scanf("%d ", &ans[i])
	}
	scanf("%d\n", &ans[n-1])
	return ans
}

func main() {
	defer writer.Flush()

	n := getLine2Int()
	a1 := getLine2Ints(n - 1)
	a2 := getLine2Ints(n - 1)
	b := getLine2Ints(n)
	cost1 := make([]int, n)
	for i := 1; i < n; i++ {
		cost1[i] = cost1[i-1] + a1[i-1]
	}
	cost2 := make([]int, n)
	for i := n - 2; i >= 0; i-- {
		cost2[i] = cost2[i+1] + a2[i]
	}
	cost3 := make([]int, n)
	for i := 0; i < n; i++ {
		cost3[i] = cost1[i] + b[i] + cost2[i]
	}
	min, second := cost3[0], cost3[1]
	if second < min {
		min, second = second, min
	}
	for i := 2; i < n; i++ {
		if cost3[i] < min {
			second, min = min, cost3[i]
		} else if cost3[i] < second {
			second = cost3[i]
		}
	}
	printf("%d\n", min+second)
}