Mr. Apple, a gourmet, works as editor-in-chief of a gastronomic periodical. He travels around the world, tasting new delights of famous chefs from the most fashionable restaurants. Mr. Apple has his own signature method of review  — in each restaurant Mr. Apple orders two sets of dishes on two different days. All the dishes are different, because Mr. Apple doesn't like to eat the same food. For each pair of dishes from different days he remembers exactly which was better, or that they were of the same quality. After this the gourmet evaluates each dish with a positive integer.Once, during a revision of a restaurant of Celtic medieval cuisine named «Poisson», that serves chestnut soup with fir, warm soda bread, spicy lemon pie and other folk food, Mr. Apple was very pleasantly surprised the gourmet with its variety of menu, and hence ordered too much. Now he's confused about evaluating dishes.The gourmet tasted a set of $$$n$$$ dishes on the first day and a set of $$$m$$$ dishes on the second day. He made a table $$$a$$$ of size $$$n \times m$$$, in which he described his impressions. If, according to the expert, dish $$$i$$$ from the first set was better than dish $$$j$$$ from the second set, then $$$a_{ij}$$$ is equal to ">", in the opposite case $$$a_{ij}$$$ is equal to "<". Dishes also may be equally good, in this case $$$a_{ij}$$$ is "=".Now Mr. Apple wants you to help him to evaluate every dish. Since Mr. Apple is very strict, he will evaluate the dishes so that the maximal number used is as small as possible. But Mr. Apple also is very fair, so he never evaluates the dishes so that it goes against his feelings. In other words, if $$$a_{ij}$$$ is "<", then the number assigned to dish $$$i$$$ from the first set should be less than the number of dish $$$j$$$ from the second set, if $$$a_{ij}$$$ is ">", then it should be greater, and finally if $$$a_{ij}$$$ is "=", then the numbers should be the same.Help Mr. Apple to evaluate each dish from both sets so that it is consistent with his feelings, or determine that this is impossible.

The first line contains integers $$$n$$$ and $$$m$$$ ($$$1 \leq n, m \leq 1000$$$) — the number of dishes in both days. Each of the next $$$n$$$ lines contains a string of $$$m$$$ symbols. The $$$j$$$-th symbol on $$$i$$$-th line is $$$a_{ij}$$$. All strings consist only of "<", ">" and "=".

The first line of output should contain "Yes", if it's possible to do a correct evaluation for all the dishes, or "No" otherwise. If case an answer exist, on the second line print $$$n$$$ integers — evaluations of dishes from the first set, and on the third line print $$$m$$$ integers — evaluations of dishes from the second set.

NoteIn the first sample, all dishes of the first day are better than dishes of the second day. So, the highest score will be $$$2$$$, for all dishes of the first day.In the third sample, the table is contradictory — there is no possible evaluation of the dishes that satisfies it.

package main

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

var (
	pre   []int
	incnt []int
	headD []*LinkD
	tailD []*LinkD
)

type LinkD struct {
	next *LinkD
	id   int
}

func findD(p int) int {
	if pre[p] == p {
		return p
	}
	pre[p] = findD(pre[p])
	return pre[p]
}
func mergeD(a, b int) {
	pa := findD(a)
	pb := findD(b)
	if pa == pb {
		return
	}

	pre[pa] = pb
}
func addD(from, to int) bool {
	pfrom := findD(from)
	pto := findD(to)
	if pfrom == pto {
		//	fmt.Printf("==%d %d %d %d\n",pfrom,pto,from,to)
		return false
	}
	p := &LinkD{
		next: headD[pfrom],
		id:   pto,
	}
	headD[pfrom] = p
	incnt[pto]++

	return true
}
func main() {
	var n int
	var m int
	buf := bufio.NewReader(os.Stdin)
	fmt.Fscanf(buf, "%d %d\n", &n, &m)
	strm := make([][]byte, n)
	ans := make([]int, n+m)
	pre = make([]int, n+m)
	incnt = make([]int, n+m)
	headD = make([]*LinkD, n+m)
	visit := make([]bool,m+n+1)
	for i := 0; i < n+m; i++ {
		pre[i] = i
		headD[i] = nil
	}
	for i := 0; i < n; i++ {
		strm[i] = make([]byte, m)
		fmt.Fscanf(buf, "%s\n", &strm[i])
		for j := 0; j < m; j++ {
			if strm[i][j] == '=' {
				mergeD(i, n+j)
			}
		}

	}
	//for i:= 0;i < n;i++{
	//	fmt.Printf("%s\n",strm[i])
	//}
	flag := true
	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			if strm[i][j] == '<' {
				if false == addD(i, j+n) {
					flag = false
				}
			} else if strm[i][j] == '>' {
				if false == addD(j+n, i) {
					flag = false
				}
			}
		}
	}
	//fmt.Printf("%v\n",incnt)
	if flag == false {
		fmt.Printf("No\n")
		return
	}
	que := make([]int, m+n+1)
	front := 0
	rear := 0
	for i := 0; i < n+m; i++ {
		if incnt[findD(i)] == 0 && visit[findD(i)]==false{
			que[rear] = findD(i)
			visit[que[rear]] = true
			//	fmt.Printf("d %d\n",que[rear])
			rear++
		}
	}
	for front < rear {
		to := headD[que[front]]

		for to != nil {
			nextp := findD(to.id)

			incnt[nextp]--
			if incnt[nextp] < 0{
				fmt.Printf("ERROR! front=%d nextp=%d ",que[front],nextp)
				return
			}
			if ans[nextp] < ans[que[front]]+1 {
				ans[nextp] = ans[que[front]] + 1
			}
			if incnt[nextp] == 0 {
				que[rear] = nextp
				rear++
			}
			to = to.next
		}
		front++
	}
	for i := 0; i < m+n; i++ {
		if incnt[findD(i)] > 0 {
			fmt.Printf("No\n")
			return
		}
	}
	fmt.Printf("Yes\n")
	for i := 0; i < n; i++ {
		fmt.Printf(" %d", ans[findD(i)]+1)

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

/**
3 3
<<<
<<=
<<=

3 2
<>
<=
>>

10 24
<><>>>><>>><>>>>>>>><<>>
<><>>>><>>><>>>>>>>><<>>
>><>>>><>>><>>>>>>>><>>>
<<<><><<<<<<><<><>>><<<>
<<<=<=<<<<<<><<=<>==<<<>
>><>>>><>>><>>>>>>>><>>>
>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<=<<<<=<<<<<<
<><>>>><>>><>>>>>>>><<>>
<><>>>><>>><>>>>>>>><<>>
 */

package main

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

func Sol1131D(reader io.Reader, writer io.Writer) {
	in := bufio.NewReader(reader)
	out := bufio.NewWriter(writer)
	defer out.Flush()

	var n, m int
	Fscan(in, &n, &m)
	fa := make([]int, n+m)
	for i := range fa {
		fa[i] = i
	}
	var find func(int) int
	find = func(x int) int {
		if fa[x] != x {
			fa[x] = find(fa[x])
		}
		return fa[x]
	}
	merge := func(from, to int) { fa[find(from)] = find(to) }

	cp := make([]string, n)
	for i := range cp {
		Fscan(in, &cp[i])
		for j, c := range cp[i] {
			if c == '=' {
				merge(n+j, i)
			}
		}
	}
	for i := range fa {
		find(i)
	}

	g := make([][]int, n+m)
	inDeg := make([]int, n+m)
	for i, s := range cp {
		for j, c := range s {
			if c == '=' {
				continue
			}
			v, w := fa[i], fa[n+j]
			if v == w {
				Fprint(out, "No")
				return
			}
			if c == '>' {
				v, w = w, v
			}
			g[v] = append(g[v], w)
			inDeg[w]++
		}
	}
	queue := []int{}
	ans := make([]int, n+m)
	cnt := 0
	for i, deg := range inDeg {
		if deg == 0 {
			queue = append(queue, i)
			ans[i] = 1
			cnt++
		}
	}
	for len(queue) > 0 {
		var v int
		v, queue = queue[0], queue[1:]
		for _, w := range g[v] {
			inDeg[w]--
			if inDeg[w] == 0 {
				queue = append(queue, w)
				ans[w] = ans[v] + 1
				cnt++
			}
		}
	}
	if cnt < n+m {
		Fprint(out, "No")
		return
	}
	Fprintln(out, "Yes")
	for i, o := range fa {
		if i == n {
			Fprintln(out)
		}
		Fprint(out, ans[o], " ")
	}
}

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

package main

import (
	"fmt"
	// "time"
	// "log"
	"bufio"
	"os"
)

const N = 1007
var d [N]string
var n, m int

var root [N * 2]int
var adj [N * 2][]int
var ans[N * 2] int
var check[N * 2] int
var cycle bool = false

func get_root(r int) int {
	if root[r] < 0 {
		return r
	} else {
		root[r] = get_root(root[r])
		return root[r]
	}
}

func union(u, v int) {
	u = get_root(u)
	v = get_root(v)
	if u == v {
		return
	}
	if root[u] > root[v] {
		u, v = v, u
	}
	root[u] += root[v];
	root[v] = u
}

func dfs(u int) {
	if cycle || check[u] == 1 {
		cycle = true
		return
	}
	if check[u] == 2 {
		return
	}
	check[u] = 1
	ans[u] = 1
	for i := range(adj[u]) {
		v := adj[u][i]
		dfs(v)
		if ans[v] >= ans[u] {
			ans[u] = ans[v] + 1
		}
	}

	check[u] = 2
}

func main() {
	scanner := bufio.NewReader(os.Stdin)
	fmt.Fscanf(scanner, "%d %d", &n, &m)

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

	for i := 0; i < n; i++ {
	  temp := ""
		fmt.Fscanf(scanner, "%s", &temp)
		fmt.Fscanf(scanner, "%s", &d[i])
		for j := 0; j < m; j++ {
			if d[i][j] == '=' {
				union(i, j + n)
			}
		}
	}

	for i := 0; i < n; i++ {
		for j := 0; j < m && !cycle; j++ {
			if d[i][j] == '=' {
				continue
			}
			u, v := get_root(i), get_root(j + n)
			if u == v {
				cycle = true
			} else if d[i][j] == '>' {
				adj[u] = append(adj[u], v)
			} else if d[i][j] == '<' {
				adj[v] = append(adj[v], u)
			}
		}
	}

	for i := 0; i < n + m && !cycle; i++ {
		if get_root(i) == i && check[i] == 0 {
			dfs(i)
		}
	}
	if cycle {
		fmt.Println("No")
	} else {
		fmt.Println("Yes")
		for i := 0; i < n; i++ {
			fmt.Print(ans[get_root(i)], " ")
		}
		fmt.Println("")
		for i := 0; i < m; i++ {
			fmt.Print(ans[get_root(i + n)], " ")
		}
	}
}

package main

import (
	"fmt"
	// "time"
	// "log"
	"bufio"
	"os"
)

const N = 1007
var d [N]string
var n, m int

var root [N * 2]int
var adj [N * 2][]int
var ans[N * 2] int
var check[N * 2] int
var cycle bool = false

func get_root(r int) int {
	if root[r] < 0 {
		return r
	} else {
		root[r] = get_root(root[r])
		return root[r]
	}
}

func union(u, v int) {
	u = get_root(u)
	v = get_root(v)
	if u == v {
		return
	}
	if root[u] > root[v] {
		u, v = v, u
	}
	root[u] += root[v];
	root[v] = u
}

func dfs(u int) {
	if cycle || check[u] == 1 {
		cycle = true
		return
	}
	if check[u] == 2 {
		return
	}
	check[u] = 1
	ans[u] = 1
	for i := range(adj[u]) {
		v := adj[u][i]
		dfs(v)
		if ans[v] >= ans[u] {
			ans[u] = ans[v] + 1
		}
	}

	check[u] = 2
}

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

	for i := 0; i < n; i++ {
		fmt.Fscanln(scanner, &d[i])
		for j := 0; j < m; j++ {
			if d[i][j] == '=' {
				union(i, j + n)
			}
		}
	}

	for i := 0; i < n; i++ {
		for j := 0; j < m && !cycle; j++ {
			if d[i][j] == '=' {
				continue
			}
			u, v := get_root(i), get_root(j + n)
			if u == v {
				cycle = true
			} else if d[i][j] == '>' {
				adj[u] = append(adj[u], v)
			} else if d[i][j] == '<' {
				adj[v] = append(adj[v], u)
			}
		}
	}

	for i := 0; i < n + m && !cycle; i++ {
		if get_root(i) == i && check[i] == 0 {
			dfs(i)
		}
	}
	if cycle {
		fmt.Println("No")
	} else {
		fmt.Println("Yes")
		for i := 0; i < n; i++ {
			fmt.Print(ans[get_root(i)], " ")
		}
		fmt.Println("")
		for i := 0; i < m; i++ {
			fmt.Print(ans[get_root(i + n)], " ")
		}
	}
}

package main

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

var (
	pre   []int
	incnt []int
	headD []*LinkD
	tailD []*LinkD
)

type LinkD struct {
	next *LinkD
	id   int
}

func findD(p int) int {
	if pre[p] == p {
		return p
	}
	pre[p] = findD(pre[p])
	return pre[p]
}
func mergeD(a, b int) {
	pa := findD(a)
	pb := findD(b)
	if pa == pb {
		return
	}

	pre[pa] = pb
}
func addD(from, to int)bool {
	pfrom := findD(from)
	pto := findD(to)
	if pfrom==pto{
	//	fmt.Printf("==%d %d %d %d\n",pfrom,pto,from,to)
		return false
	}
	p := &LinkD{
		next: headD[pfrom],
		id:   pto,
	}
	headD[pfrom] = p
	incnt[pto]++
	//fmt.Printf("pf =%d pto=%d\n",pfrom ,pto)
	return true
}
func main() {
	var n int
	var m int
	buf := bufio.NewReader(os.Stdin)
	fmt.Fscanf(buf, "%d %d\n", &n, &m)
	strm := make([][]byte, n)
	ans := make([]int, n+m)
	pre = make([]int, n+m)
	incnt = make([]int, n+m)
	headD = make([]*LinkD, n+m)
	for i := 0; i < n+m; i++ {
		pre[i] = i
		headD[i] = nil
	}
	for i := 0; i < n; i++ {
		strm[i] = make([]byte,m)
		fmt.Fscanf(buf, "%s\n", &strm[i])
		for j := 0; j < m; j++ {
			if strm[i][j] == '=' {
				mergeD(i, n+j)
			}
		}

	}
	//for i:= 0;i < n;i++{
	//	fmt.Printf("%s\n",strm[i])
	//}
	flag := true
	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			if strm[i][j] == '<' {
				if false == addD(i, j+n){
					flag=false
				}
			} else if strm[i][j] == '>' {
				if false == addD(j+n, i){
					flag=false
				}
			}
		}
	}
	if flag == false{
		fmt.Printf("No\n")
		return
	}
	que := make([]int, m+n+1)
	front := 0
	rear := 0
	for i := 0; i < n+m; i++ {
		if incnt[findD(i)] == 0 {
			que[rear] = findD(i)
		//	fmt.Printf("d %d\n",que[rear])
			rear++
		}
	}
	for front<rear {
		to := headD[que[front]]
	//	nowp := headD[que[front]]
		for to!=nil {
			nextp := findD(to.id)
			incnt[nextp]--
			if ans[nextp] < ans[que[front]]+1{
				ans[nextp] = ans[que[front]]+1
			}
			if incnt[nextp] == 0 {
			//	fmt.Printf("d %d\n",nextp)
				que[rear] = nextp

				rear++
			}
			to = to.next
		}
		front++
	}
		for i:=0;i < m+n;i++ {
			if incnt[findD(i)] > 0 {
				fmt.Printf("No\n")
				return
			}
		}
	fmt.Printf("Yes\n")
	for i := 0; i < n; i++ {

		fmt.Printf(" %d", ans[findD(i)]+1)

	}
	fmt.Printf("\n")
	for i := 0; i < m; i++ {

		fmt.Printf(" %d", ans[findD(n+i)]+1)

	}
	fmt.Printf("\n")
}
/**
3 3
<<<
<<=
<<=

3 2
<>
<=
>>
 */

package main

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

var (
	pre   []int
	incnt []int
	headD []*LinkD
	tailD []*LinkD
)

type LinkD struct {
	next *LinkD
	id   int
}

func findD(p int) int {
	if pre[p] == p {
		return p
	}
	pre[p] = findD(pre[p])
	return pre[p]
}
func mergeD(a, b int) {
	pa := findD(a)
	pb := findD(b)
	if pa == pb {
		return
	}

	pre[pa] = pb
}
func addD(from, to int)bool {
	pfrom := findD(from)
	pto := findD(to)
	if pfrom==pto{
	//	fmt.Printf("==%d %d %d %d\n",pfrom,pto,from,to)
		return false
	}
	p := &LinkD{
		next: headD[pfrom],
		id:   pto,
	}
	headD[pfrom] = p
	incnt[pto]++
	//fmt.Printf("pf =%d pto=%d\n",pfrom ,pto)
	return true
}
func main() {
	var n int
	var m int
	buf := bufio.NewReader(os.Stdin)
	fmt.Fscanf(buf, "%d %d\n", &n, &m)
	strm := make([][]byte, n)
	ans := make([]int, n+m)
	pre = make([]int, n+m)
	incnt = make([]int, n+m)
	headD = make([]*LinkD, n+m)
	for i := 0; i < n+m; i++ {
		pre[i] = i
		headD[i] = nil
	}
	for i := 0; i < n; i++ {
		strm[i] = make([]byte,m)
		fmt.Fscanf(buf, "%s\n", &strm[i])
		for j := 0; j < m; j++ {
			if strm[i][j] == '=' {
				mergeD(i, n+j)
			}
		}
	}
	flag := true
	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			if strm[i][j] == '<' {
				if false == addD(i, j+n){
					flag=false
				}
			} else if strm[i][j] == '>' {
				if false == addD(j+n, i){
					flag=false
				}
			}
		}
	}
	if flag == false{
		fmt.Printf("No\n")
		return
	}
	que := make([]int, m+n+1)
	front := 0
	rear := 0
	for i := 0; i < n+m; i++ {
		if incnt[findD(i)] == 0 {
			que[rear] = findD(i)
		//	fmt.Printf("d %d\n",que[rear])
			rear++
		}
	}
	for front<rear {
		to := headD[que[front]]
	//	nowp := headD[que[front]]
		for to!=nil {
			nextp := findD(to.id)
			incnt[nextp]--
			if incnt[nextp] == 0 {
			//	fmt.Printf("d %d\n",nextp)
				que[rear] = nextp
				if ans[nextp] < ans[que[front]]+1{
					ans[nextp] = ans[que[front]]+1
				}
				rear++
			}
			to = to.next
		}
		front++
	}
		for i:=0;i < m+n;i++ {
			if incnt[findD(i)] > 0 {
				fmt.Printf("No\n")
				return
			}
		}
	fmt.Printf("Yes\n")
	for i := 0; i < n; i++ {

		fmt.Printf(" %d", ans[findD(i)]+1)

	}
	fmt.Printf("\n")
	for i := 0; i < m; i++ {

		fmt.Printf(" %d", ans[findD(n+i)]+1)

	}
	fmt.Printf("\n")
}
/**
3 3
<<<
<<=
<<=
 */

package main

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

var (
	pre   []int
	incnt []int
	headD []*LinkD
	tailD []*LinkD
)

type LinkD struct {
	next *LinkD
	id   int
}

func findD(p int) int {
	if pre[p] == p {
		return p
	}
	pre[p] = findD(pre[p])
	return pre[p]
}
func mergeD(a, b int) {
	pa := findD(a)
	pb := findD(b)
	if pa == pb {
		return
	}

	pre[pa] = pb
}
func addD(from, to int)bool {
	pfrom := findD(from)
	pto := findD(to)
	if pfrom==pto{
		return false
	}
	p := &LinkD{
		next: headD[pfrom],
		id:   pto,
	}
	headD[pfrom] = p
	incnt[pto]++
	//fmt.Printf("pf =%d pto=%d\n",pfrom ,pto)
	return true
}
func main() {
	var n int
	var m int
	buf := bufio.NewReader(os.Stdin)
	fmt.Fscanf(buf, "%d %d\n", &n, &m)
	strm := make([][]byte, n)
	ans := make([]int, n+m)
	pre = make([]int, n+m)
	incnt = make([]int, n+m)
	headD = make([]*LinkD, n+m)
	for i := 0; i < n+m; i++ {
		pre[i] = i
		headD[i] = nil
	}
	for i := 0; i < n; i++ {
		strm[i] = make([]byte,m)
		fmt.Fscanf(buf, "%s\n", &strm[i])
		for j := 0; j < m; j++ {
			if strm[i][j] == '=' {
				mergeD(i, n+j)
			}
		}
	}
	flag := true
	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			if strm[i][j] == '<' {
				if false == addD(i, j+n){
					flag=false
				}
			} else if strm[i][j] == '>' {
				if false == addD(j+n, i){
					flag=false
				}
			}
		}
	}
	if flag == false{
		fmt.Printf("No\n")
		return
	}
	que := make([]int, m+n+1)
	front := 0
	rear := 0
	for i := 0; i < n+m; i++ {
		if incnt[findD(i)] == 0 {
			que[rear] = findD(i)
		//	fmt.Printf("d %d\n",que[rear])
			rear++
		}
	}
	for front<rear {
		to := headD[que[front]]
	//	nowp := headD[que[front]]
		for to!=nil {
			nextp := findD(to.id)
			incnt[nextp]--
			if incnt[nextp] == 0 {
			//	fmt.Printf("d %d\n",nextp)
				que[rear] = nextp
				if ans[nextp] < ans[que[front]]+1{
					ans[nextp] = ans[que[front]]+1
				}
				rear++
			}
			to = to.next
		}
		front++
	}
	if front < n+m{
		fmt.Printf("No\n")
		return
	}
	fmt.Printf("Yes\n")
	for i := 0; i < n; i++ {

		fmt.Printf(" %d", ans[findD(i)]+1)

	}
	fmt.Printf("\n")
	for i := 0; i < m; i++ {

		fmt.Printf(" %d", ans[findD(n+i)]+1)

	}
	fmt.Printf("\n")
}

package main

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

var (
	strm [][]byte
)

func fuD(a, b int) byte {
	if a < b {
		return '<'
	} else if a > b {
		return '>'
	}
	return '='
}
func main() {
	var n int
	var m int
	buf := bufio.NewReader(os.Stdin)
	fmt.Fscanf(buf, "%d %d\n", &n, &m)
	strm = make([][]byte, n)
	ansm := make([]int, m)
	ansn := make([]int, n)
	for i := 0; i < n; i++ {
		strm[i] = make([]byte, m+1)
		fmt.Fscanf(buf, "%s\n", &strm[i])
	}

	flag := make([]bool, 8)
	ansn[0] = 4
	flag[4] = true
	for j := 0; j < m; j++ {
		if strm[0][j] == '=' {
			ansm[j] = 4
		} else if strm[0][j] == '<' {
			ansm[j] = 6

		} else {
			ansm[j] = 2
		}
		flag[ansm[j]] = true
	}

	pp := []int{4, 2, 6, 3, 5, 1, 7}
	ansf := true
	for i := 1; ansf && i < n; i++ {
		for k := 0; k < 7; k++ {
			tf := true
			for j := 0; j < m; j++ {
				if fuD(pp[k], ansm[j]) != strm[i][j] {
					tf = false
					break
				}
			}
			if tf {
				ansn[i] = pp[k]
				flag[pp[k]] = true
				break
			}
		}
		if ansn[i] <= 0 {
			ansf = false
		}
	}
//	fmt.Printf("ansm=%v\n",ansm)
//	fmt.Printf("ansn=%v\n",ansn)
	if ansf == false {
		fmt.Printf("No\n")
		return
	}
	pre := make([]int, 8)
	cnt := 0

	for i := 1; i <= 7; i++ {
		if flag[i] {
			cnt++
		}
		pre[i] = cnt
	}
	fmt.Printf("Yes\n")
	for i := 0; i < n; i++ {

		fmt.Printf(" %d", pre[ansn[i]])

	}
	fmt.Printf("\n")
	for i := 0; i < m; i++ {

		fmt.Printf(" %d", pre[ansm[i]])

	}
	fmt.Printf("\n")
}

package main

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

var (
	strm [][]byte
)

func fuD(a, b int) byte {
	if a < b {
		return '<'
	} else if a > b {
		return '>'
	}
	return '='
}
func main() {
	var n int
	var m int
	buf := bufio.NewReader(os.Stdin)
	fmt.Fscanf(buf, "%d %d\n", &n, &m)
	strm = make([][]byte, n)
	ansm := make([]int, m)
	ansn := make([]int, n)
	for i := 0; i < n; i++ {
		strm[i] = make([]byte, m+1)
		fmt.Fscanf(buf, "%s\n", &strm[i])
	}

	flag := make([]bool, 8)
	ansn[0] = 4
	for j := 0; j < m; j++ {
		if strm[0][j] == '=' {
			ansm[j] = 4
		} else if strm[0][j] == '<' {
			ansm[j] = 6

		} else {
			ansm[j] = 2
		}
		flag[ansm[j]] = true
	}

	pp := []int{4, 2, 6, 3, 5, 1, 7}
	ansf := true
	for i := 1; ansf && i < n; i++ {
		for k := 0; k < 7; k++ {
			tf := true
			for j := 0; j < m; j++ {
				if fuD(pp[k], ansm[j]) != strm[i][j] {
					tf = false
					break
				}
			}
			if tf {
				ansn[i] = pp[k]
				flag[pp[k]] = true
				break
			}
		}
		if ansn[i] <= 0 {
			ansf = false
		}
	}
//	fmt.Printf("ansm=%v\n",ansm)
//	fmt.Printf("ansn=%v\n",ansn)
	if ansf == false {
		fmt.Printf("No\n")
		return
	}
	pre := make([]int, 8)
	cnt := 0

	for i := 1; i <= 7; i++ {
		if flag[i] {
			cnt++
		}
		pre[i] = cnt
	}
	fmt.Printf("Yes\n")
	for i := 0; i < n; i++ {

		fmt.Printf(" %d", pre[ansn[i]])

	}
	fmt.Printf("\n")
	for i := 0; i < m; i++ {

		fmt.Printf(" %d", pre[ansm[i]])

	}
	fmt.Printf("\n")
}

package main

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

var (
	strm [][]byte
)

func fuD(a, b int) byte {
	if a < b {
		return '<'
	} else if a > b {
		return '>'
	}
	return '='
}
func main() {
	var n int
	var m int
	buf := bufio.NewReader(os.Stdin)
	fmt.Fscanf(buf, "%d %d\n", &n, &m)
	strm = make([][]byte, n)
	ansm := make([]int, m)
	ansn := make([]int, n)
	for i := 0; i < n; i++ {
		strm[i] = make([]byte, m+1)
		fmt.Fscanf(buf, "%s\n", &strm[i])
	}

	flag := make([]bool, 8)
	ansn[0] = 4
	for j := 0; j < m; j++ {
		if strm[0][j] == '=' {
			ansm[j] = 4
		} else if strm[0][j] == '<' {
			ansm[j] = 6

		} else {
			ansm[j] = 2
		}
		flag[ansm[j]] = true
	}

	pp := []int{4, 2, 6, 3, 5, 1, 7}
	ansf := true
	for i := 1; ansf && i < n; i++ {
		for k := 0; k < 7; k++ {
			tf := true
			for j := 0; j < m; j++ {
				if fuD(pp[k], ansm[j]) != strm[i][j] {
					tf = false
					break
				}
			}
			if tf {
				ansn[i] = pp[k]
				flag[pp[k]] = true
				break
			}
		}
		if ansn[i] <= 0 {
			ansf = false
		}
	}
//	fmt.Printf("ansm=%v\n",ansm)
//	fmt.Printf("ansn=%v\n",ansn)
	if ansf == false {
		fmt.Printf("No\n")
		return
	}
	pre := make([]int, 8)
	cnt := 0

	for i := 1; i <= 7; i++ {
		if flag[i] {
			cnt++
		}
		pre[i] = cnt
	}
	fmt.Printf("Yes\n")
	for i := 0; i < n; i++ {

		fmt.Printf("%d", pre[ansn[i]])

	}
	fmt.Printf("\n")
	for i := 0; i < m; i++ {

		fmt.Printf("%d", pre[ansm[i]])

	}
	fmt.Printf("\n")
}

package main

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

func Sol1131D(reader io.Reader, writer io.Writer) {
	min := func(a, b int) int {
		if a <= b {
			return a
		}
		return b
	}
	max := func(a, b int) int {
		if a >= b {
			return a
		}
		return b
	}
	unique := func(arr []int) (newArr []int) {
		n := len(arr)
		newArr = make([]int, 1, n)
		newArr[0] = arr[0]
		for i := 1; i < n; i++ {
			if arr[i] != arr[i-1] {
				newArr = append(newArr, arr[i])
			}
		}
		return
	}
	discrete := func(arr []int, start int) (newArr []interface{}) {
		n := len(arr)
		uniqueArr := make([]int, n)
		copy(uniqueArr, arr)
		sort.Ints(uniqueArr)
		uniqueArr = unique(uniqueArr)
		newArr = make([]interface{}, n)
		for i, v := range arr {
			newArr[i] = start + sort.Search(len(uniqueArr), func(j int) bool { return uniqueArr[j] >= v })
		}
		return
	}
	type dish struct {
		l, r int
	}

	in := bufio.NewReader(reader)
	out := bufio.NewWriter(writer)
	defer out.Flush()

	var n, m int
	Fscan(in, &n, &m)
	dishes1 := make([]dish, n)
	dishes2 := make([]dish, m)

	var symbols string
	Fscan(in, &symbols)
	for j, c := range symbols {
		d2 := &dishes2[j]
		if c == '<' {
			d2.l, d2.r = 1, 2000
		} else if c == '>' {
			d2.l, d2.r = -2000, -1
		}
	}
	for i := 1; i < n; i++ {
		l, r := -4000, 4000
		Fscan(in, &symbols)
		for j, c := range symbols {
			d2 := &dishes2[j]
			if c == '=' {
				if l == -4000 {
					l = d2.l
				} else if l != d2.l {
					Fprintln(out, "No")
					return
				}
				if r == 4000 {
					r = d2.r
				} else if r != d2.r {
					Fprintln(out, "No")
					return
				}
			} else if c == '<' {
				r = min(r, d2.l-1)
			} else {
				l = max(l, d2.r+1)
			}
			if l > r {
				Fprintln(out, "No")
				return
			}
		}
		dishes1[i].l, dishes1[i].r = l, r
	}

	var shown [8001]bool
	ans := []int{}
	for _, d := range append(dishes1, dishes2...) {
		if d.l >= 0 {
			d.l += 4000
		} else {
			d.l = d.r + 4000
		}
		shown[d.l] = true
		ans = append(ans, d.l)
	}
	var cnt [8001]int
	for i := 1; i < 8001; i++ {
		if shown[i] {
			cnt[i] = cnt[i-1] + 1
		}
	}

	pAns := discrete(ans, 1)
	Fprintln(out, "Yes")
	Fprintln(out, pAns[:len(dishes1)]...)
	Fprintln(out, pAns[len(dishes1):]...)
}

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

package main

import (
	"fmt"
)

const N = 1007
var d [N]string
var n, m int

var root [N * 2]int
var adj [N * 2][]int
var ans[N * 2] int
var check[N * 2] int
var cycle bool = false

func get_root(r int) int {
	if root[r] < 0 {
		return r
	} else {
		root[r] = get_root(root[r])
		return root[r]
	}
}

func union(u, v int) {
	u = get_root(u)
	v = get_root(v)
	if u == v {
		return
	}
	if root[u] > root[v] {
		u, v = v, u
	}
	root[u] += root[v];
	root[v] = u
}

func dfs(u int) {
	if cycle || check[u] == 1 {
		cycle = true
		return
	}
	check[u] = 1
	ans[u] = 1
	for i := range(adj[u]) {
		v := adj[u][i]
		dfs(v)
		if ans[v] >= ans[u] {
			ans[u] = ans[v] + 1
		}
	}

	check[u] = 2
}

func main() {
	fmt.Scan(&n, &m)
	for i := 0; i < n + m; i++ {
		root[i] = -1;
	}

	for i := 0; i < n; i++ {
		fmt.Scan(&d[i])
		for j := 0; j < m; j++ {
			if d[i][j] == '=' {
				union(i, j + n)
			}
		}
	}

	for i := 0; i < n; i++ {
		fmt.Scan(&d[i])
		for j := 0; j < m && !cycle; j++ {
			u, v := get_root(i), get_root(j + n)
			if u == v && d[u][v] == '=' {
				cycle = true
			} else if d[i][j] == '>' {
				adj[get_root(i)] = append(adj[get_root(i)], get_root(j + n))
			} else if d[i][j] == '<' {
				adj[get_root(j + n)] = append(adj[get_root(j + n)], get_root(i))
			}
		}
	}

	for i := 0; i < n + m && !cycle; i++ {
		if get_root(i) == i && check[i] == 0 {
			dfs(i)
		}
	}
	if cycle {
		fmt.Println("No")
	} else {
		fmt.Println("Yes")
		for i := 0; i < n; i++ {
			fmt.Print(ans[get_root(i)], " ")
		}
		fmt.Println("")
		for i := 0; i < m; i++ {
			fmt.Print(ans[get_root(i + n)], " ")
		}
	}
}


Polycarp is mad about coding, that is why he writes Sveta encoded messages. He calls the median letter in a word the letter which is in the middle of the word. If the word's length is even, the median letter is the left of the two middle letters. In the following examples, the median letter is highlighted: contest, info. If the word consists of single letter, then according to above definition this letter is the median letter. Polycarp encodes each word in the following way: he writes down the median letter of the word, then deletes it and repeats the process until there are no letters left. For example, he encodes the word volga as logva.You are given an encoding s of some word, your task is to decode it.

The first line contains a positive integer n (1 ≤ n ≤ 2000) — the length of the encoded word. The second line contains the string s of length n consisting of lowercase English letters — the encoding.

NoteIn the first example Polycarp encoded the word volga. At first, he wrote down the letter l from the position 3, after that his word looked like voga. After that Polycarp wrote down the letter o from the position 2, his word became vga. Then Polycarp wrote down the letter g which was at the second position, the word became va. Then he wrote down the letter v, then the letter a. Thus, the encoding looked like logva.In the second example Polycarp encoded the word no. He wrote down the letter n, the word became o, and he wrote down the letter o. Thus, in this example, the word and its encoding are the same.In the third example Polycarp encoded the word baba. At first, he wrote down the letter a, which was at the position 2, after that the word looked like bba. Then he wrote down the letter b, which was at the position 2, his word looked like ba. After that he wrote down the letter b, which was at the position 1, the word looked like a, and he wrote down that letter a. Thus, the encoding is abba.

package main

import "fmt"

func main() {
	var n, i int
	var s, result string
	fmt.Scan(&n, &s)
	if n%2 == 1 {
		result = string(s[0])
		i++
	}
	for ; i < n; i += 2 {
		result = string(s[i]) + result + string(s[i+1])
	}
	fmt.Println(result)
}

package main

import "fmt"

func main() {
	var n, i int
	var s, result string
	fmt.Scan(&n, &s)
	if n%2 == 1 {
		result = string(s[0])
		i++
	}
	for ; i < n; {
		result = string(s[i]) + result + string(s[i+1])
		i += 2
	}
	fmt.Println(result)
}

package main

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

func main() {

	n := ScanInt64()
	s := ScanWord()
	ans := make([]byte, n)
	atTheEnd := true
	end := n - 1
	begin := 0
	for ; n > 0; n-- {
		if atTheEnd {
			ans[end] = s[n-1]
			end--
		} else {
			ans[begin] = s[n-1]
			begin++
		}
		atTheEnd = !atTheEnd

	}
	fmt.Println(string(ans))

}

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

var O chan string
var in *bufio.Scanner
var oWg *sync.WaitGroup
var P func(a ...interface{}) (n int, err error)

func init() {
	P = fmt.Println

	in = bufio.NewScanner(os.Stdin)
	in.Buffer(make([]byte, 1024), int(1e+9))
	in.Split(bufio.ScanWords)

	O = make(chan string, 16)
	oWg = &sync.WaitGroup{}
	oWg.Add(1)

	writer := bufio.NewWriter(os.Stdout)
	go func() {
		defer oWg.Done()
		defer writer.Flush()

		for line := range O {
			writer.WriteString(line + "\n")
		}
	}()
}

func ScanWord() string { in.Scan(); return in.Text() }
func ScanInt() int     { i, _ := strconv.Atoi(ScanWord()); return i }
func ScanInt64() int64 { i, _ := strconv.ParseInt(ScanWord(), 10, 64); return i }
func ScanStringSlice(n int) []string {
	s := make([]string, n)
	for i := 0; i < n; i++ {
		s[i] = ScanWord()
	}
	return s
}
func ScanIntSlice(n int) []int {
	arr := make([]int, n)
	for i := 0; i < n; i++ {
		arr[i] = ScanInt()
	}
	return arr
}
func ScanInt64Slice(n int) []int64 {
	arr := make([]int64, n)
	for i := 0; i < n; i++ {
		arr[i] = ScanInt64()
	}
	return arr
}

/*********************** Utils ***********************/

func S(v interface{}) string { return fmt.Sprintf("%v", v) }
func SArr(a []int) string {
	sb := strings.Builder{}
	sb.Grow(len(a) * 9)
	for i := range a {
		sb.WriteString(strconv.Itoa(a[i]) + " ")
	}
	return sb.String()
}
func SArr64(a []int64) string {
	sb := strings.Builder{}
	sb.Grow(len(a) * 9)
	for i := range a {
		sb.WriteString(strconv.FormatInt(a[i], 10) + " ")
	}
	return sb.String()
}
func MnMx(args []int64) (int64, int64) {
	minVal, maxVal := int64(math.MaxInt64), int64(math.MinInt64)
	for _, v := range args {
		if v < minVal {
			minVal = v
		}
		if v > maxVal {
			maxVal = v
		}
	}
	return minVal, maxVal
}
func Mn(args []int64) int64 { mn, _ := MnMx(args); return mn }
func Mx(args []int64) int64 { _, mx := MnMx(args); return mx }
func LCM(a, b int64) int64  { return a / GCD(a, b) * b }
func GCD(a, b int64) int64 {
	if a == 0 {
		return b
	}
	return GCD(b%a, a)
}
func sortInt64Slice(a []int64) { sort.Slice(a, func(i, j int) bool { return a[i] < a[j] }) }
func abs(x int64) int64 {
	if x < 0 {
		return -x
	}
	return x
}
func MinimumMaximum(a, b int64) (int64, int64) {
	if a < b {
		return a, b
	}
	return b, a

}
func Minimum(a, b int64) int64 {
	min, _ := MinimumMaximum(a, b)
	return min

}
func Maximum(a, b int64) int64 {
	_, max := MinimumMaximum(a, b)
	return max

}

package main

import "fmt"

func main() {
	var n int
	var s string
	var r []byte

	fmt.Scanf("%d\n", &n)
	fmt.Scanf("%s\n", &s)

	if n%2 == 0 {
		var mundur int = 2
		var maju int = 1
		r = make([]byte, n)

		r[n/2-1] = s[0]

		for i := n/2 - 1 - 1; i > -1; i-- {
			r[i] = s[mundur]
			mundur += 2
		}

		for i := n / 2; i < n; i++ {
			r[i] = s[maju]
			maju += 2
		}
	} else {
		var mundur int = 1
		var maju int = 2
		r = make([]byte, n)

		r[n/2] = s[0]

		for i := n/2 - 1; i > -1; i-- {
			r[i] = s[mundur]
			mundur += 2
		}

		for i := n/2 + 1; i < n; i++ {
			r[i] = s[maju]
			maju += 2
		}
	}

	fmt.Println(string(r))
}

package main

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

func main() {
	var n int
	if _, err := fmt.Scanf("%d\n", &n); err != nil {
		return
	}

	reader := bufio.NewReader(os.Stdin)
	re := regexp.MustCompile(`\r?\n`)

	if s, err := reader.ReadString('\n'); err != nil {
		if err != io.EOF {
			return
		}
	} else {
		s = re.ReplaceAllString(s, "")

		o := make([]rune, n)
		l := 0
		r := n - 1
		for i := 0; i < n; i++ {
			j := n - i - 1
			if i%2 == 0 {
				o[r] = rune(s[j])
				r--
			} else {
				o[l] = rune(s[j])
				l++
			}
		}

		fmt.Println(string(o))
	}
}

package main

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

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 getLine() string {
	s, _ := reader.ReadString('\n')
	if strings.HasSuffix(s, "\r\n") {
		s = s[:len(s)-2]
	} else if strings.HasSuffix(s, "\n") {
		s = s[:len(s)-1]
	}
	return s
}
func getLine2Int() (n int) {
	scanf("%d\n", &n)
	return
}
func getLine2Int2() (a, b int64) {
	scanf("%d %d\n", &a, &b)
	return
}
func getLine2Ints(n int) []int64 {
	ans := make([]int64, n)
	for i := 0; i < n; i++ {
		scanf("%d ", &ans[i])
	}
	scanf("%d\n", &ans[n-1])
	return ans
}

func pcheck(i bool) {
	if i {
		printf("Yes\n")
	} else {
		printf("No\n")
	}
}

var debug = true

func see(a interface{}) {
	if debug {
		printf("DEBUG:%v\n", a)
	}
}

func main() {
	defer writer.Flush()

	m := getLine2Int()
	s := getLine()
	m = (len(s) + 1) / 2
	d := make([]byte, len(s))
	left, right, j := m, m, m
	for i := 0; i < len(s); i++ {
		d[j-1] = s[i]
		if j*2 <= len(s) {
			right++
			j = right
		} else {
			left--
			j = left
		}
	}
	printf("%s\n", string(d))
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	var d bool
	if n%2 == 0 {
		d = true
	}
	var dec string
	fmt.Scan(&dec)
	var s string
	for i := 0; i < n; i++ {
		if d {
			s = string(dec[i]) + s
			d = false
		} else {
			s = s + string(dec[i])
			d = true
		}
	}
	fmt.Println(s)
}

	package main

	import (
		"fmt"
	)

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

		if n == 1 {
			fmt.Println(decodedWord)
			return
		}

		decodedWordRune := []rune(decodedWord)
		var encodedWord []rune
		var index = n - 2
		for ; index >= 0; index -= 2 {
			encodedWord = append(encodedWord, decodedWordRune[index])
		}

		index += 2
		index ^= 1

		for ; index < n; index += 2 {
			encodedWord = append(encodedWord, decodedWordRune[index])
		}

		fmt.Println(string(encodedWord))
	}

package main

import (
    "fmt"
    // "os"
)

func Btoi(b bool) int {
    if b {
        return 1
    }
    return 0
 }

func main()  {
    var (
        n int
        d bool = false
        ans string
        a string
    )

    fmt.Scan(&n)
    fmt.Scan(&a)

    d = ((n & 1) ^ 1) == 1

    for i := 0; i < n; i++ {
        if d {
            ans = string(a[i]) + ans
            d = false
        } else {
            ans = ans + string(a[i])
            d = true
        }
    }

    fmt.Println(ans)
}

package main

import "fmt"
func main() {
	var n int
	var s string
	fmt.Scan(&n, &s)
	a := 0
	b := n - 1
	r := make([]byte, n)
	nowA := false
	for i := 0; i < n; i++ {
	    if nowA {
	        r[a] = s[n - i - 1]
	        a ++
	    } else {
	        r[b] = s[n - i - 1]
	        b --
	    }
	    nowA = !nowA
	}
	for _, b := range r {
	    fmt.Printf("%c", b)
	}
}

package main

import "fmt"
func main() {
	var n int
	var s string
	fmt.Scan(&n, &s)
	a := 0
	b := n - 1
	r := make([]byte, n)
	nowA := !true
	for i := 0; i < n; i++ {
	    if nowA {
	        r[a] = s[n - i - 1]
	        a ++
	    } else {
	        r[b] = s[n - i - 1]
	        b --
	    }
	    nowA = !nowA
	}
	for _, b := range r {
	    fmt.Printf("%c", b)
	}
}

package main

import "fmt"

func main() {
	n, s := 0, ""
	fmt.Scan(&n, &s)

	result := ""
	if n%2 == 1 {
		result, s, n = s[0:1], s[1:], n-1
	}

	for i := 0; i < n; i += 2 {
		result = s[i:i+1] + result + s[i+1:i+2]
	}
	fmt.Println(result)
}

package main

import (
	"fmt"
)

func main() {
	var str_len int
	var my_string string
	var output_string []byte
	fmt.Scan( &str_len,&my_string)

	input_slice := []byte(my_string)
	for i, v := range input_slice {
		if i%2 == 0 {
			output_string = append([]byte{v}, output_string...)

		} else {
			output_string = append(output_string, v)
		}
	}
	if str_len%2 != 0 {
		//reverse string
		l := len(output_string) - 1
		for i := 0; i < l; i++ {
			output_string[i], output_string[l] = output_string[l], output_string[i]

			l--
		}
	}
	fmt.Println(string(output_string))
}

package main

import "fmt"

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

	var ans []rune

	for i, c := range word {
		if i%2 == 0 && n%2 == 1 || i%2 == 1 && n%2 == 0 {
			ans = append(ans, c)
		} else {
			ans = append([]rune{c}, ans...)
		}
	}

	fmt.Println(string(ans))
}

package main

import "fmt"

func main() {
	var n, i int
	var s, result string
	fmt.Scan(&n, &s)
	fmt.Println(s[:n])
	if n%2 == 1 {
		result = string(s[0])
		i++
	}
	for ; i < n; i += 2 {
		result = string(s[i]) + result + string(s[i+1])
	}
	fmt.Println(result)
}

package main

import "fmt"

func main() {
	var n int
	var ss string
	var output []rune
	fmt.Scan(&n)
	fmt.Scan(&ss)
	s := []rune(ss)
	mid := n / 2
	if n%2 != 0 {
		output = append(output, s[mid])
		for i := 1; i <= mid; i++ {
			output = append(output, s[mid-i])
			output = append(output, s[mid+i])
		}
	} else {
		mid--
		for i := 0; i <= mid; i++ {
			output = append(output, s[mid-i])
			output = append(output, s[mid+i+1])
		}
	}
	fmt.Println(string(output))
}

package main

import (
	"fmt"
)

func main()  {
	var str_len int
	var my_string string
	var output_string []byte
	fmt.Scanf("%d",&str_len)
	fmt.Scanf("%s",&my_string)
	input_slice := []byte(my_string)
		for i,v := range input_slice{
			if i % 2 == 0{
				output_string = append([]byte{v},output_string...)

			}else {
				output_string = append(output_string,v)
			}
		}
		if str_len % 2 !=0{
			//reverse string
			l:=len(output_string)-1
			for i:=0 ; i < l ;i++{
				output_string[i] , output_string[l] = output_string[l] , output_string[i]

				l--
			}
		}
		fmt.Println(string(output_string))
}

package main

import (
	"fmt"
)

func main()  {
	var str_len int
	var my_string string
	var output_string []byte
	fmt.Scanf("%d",&str_len)
	fmt.Scanf("%s",&my_string)
	input_slice := []byte(my_string)
		for i,v := range input_slice{
			if i % 2 == 0{
				output_string = append([]byte{v},output_string...)

			}else {
				output_string = append(output_string,v)
			}
		}
		if str_len % 2 !=0{
			//reverse string
			l:=len(output_string)-1
			for i:=0 ; i < l ;i++{
				output_string[i] , output_string[l] = output_string[l] , output_string[i]

				l--
			}
		}
		fmt.Printf("%s",output_string)
}

package main

import (
	"fmt"
)

func main()  {
	var str_len int
	var my_string string
	var output_string []byte
	fmt.Scanf("%d",&str_len)
	fmt.Scanf("%s",&my_string)
	input_slice := []byte(my_string)
fmt.Println(input_slice)
		for i,v := range input_slice{
			if i % 2 == 0{
				output_string = append([]byte{v},output_string...)

			}else {
				output_string = append(output_string,v)
			}
		}
		if str_len % 2 !=0{
			//reverse string
			l:=len(output_string)-1
			for i:=0 ; i < l ;i++{
				output_string[i] , output_string[l] = output_string[l] , output_string[i]

				l--
			}
		}

		fmt.Printf("%s",output_string)

}