func (r Region) End() int {
	return r.To
}
End return end of Region
package region
import (
	"fmt"
)
type Region struct {
	From, To int
	Dir      Direction
}
func NewRegion(from, to int) Region {
	dir := POSITIVE
	if from > to {
		from, to, dir = to, from, REVERSE
	}
	return Region{from, to, dir}
}
func (r Region) String() string {
	return fmt.Sprintf("(%d, %d)", r.From, r.To)
}
func (r Region) RealFrom() int {
	return MinByDir(r.From, r.To, r.Dir)
}
func (r Region) RealTo() int {
	return MaxByDir(r.From, r.To, r.Dir)
}
func (r Region) Begin() int {
	return r.From
}