text:
using ConcreteStructs
using ConcreteStructs: _parse_head, _parse_struct_def, _parse_line
using ConcreteStructs: _strip_super, _get_subparams, _get_constructor_params
using LinearAlgebra: Adjoint
using Suppressor
using Test

# # Unit Tests

# Test setup
line_number_node = LineNumberNode(1)
annotated_abstract = :(b::AbstractFloat)
annotated_concrete = :(b::Float64)
struct_name = :(MyStruct)
sub_typed_params = :(MyStruct{T1,T2<:AbstractVector{T1}})
sub_typed = :(MyStruct{D} <: Number)
kitchen_sink = :(MyStruct{T1, T2<:AbstractVector{T1}} <: AbstractVector{T1})
plain_assignment = :(a=1)
annotated_assignment = :(a::Float64=2.0)
subtype_annotated_assignment = :(a<:Real=2.0)

# Run tests
@testset "Unit tests" begin
    @testset "_parse_line" begin
        @test _parse_line(line_number_node) == (line_number_node, nothing)
        # @test _parse_line(annotated_abstract)[1].args[2] != :AbstractFloat
        # @test _parse_line(annotated_abstract)[2].args[2] == :AbstractFloat
        @test _parse_line(annotated_concrete)[1].args[2] == :Float64
        @test _parse_line(annotated_concrete)[2] === nothing

        parsed_sym = _parse_line(:a)
        @test parsed_sym[1].args[2] == parsed_sym[2]

        @test _parse_line(plain_assignment)[1].head == :(=)
        @test _parse_line(plain_assignment)[1].args[1].args[2] == _parse_line(plain_assignment)[2]
        @test _parse_line(annotated_assignment)[1].head == :(=)
        @test _parse_line(annotated_assignment)[2] === nothing
        @test _parse_line(subtype_annotated_assignment)[1].head == :(=)
        @test _parse_line(subtype_annotated_assignment)[2].args[2] == :Real
    end

    @testset "_parse_struct_def" begin
        @test _parse_struct_def(struct_name) == (struct_name, [])
        @test _parse_struct_def(sub_typed_params) == (struct_name, [:T1, :(T2<:AbstractVector{T1})])
    end

    @testset "_parse_head" begin
        @test _parse_head(struct_name) == (struct_name, [], :Any)
        @test _parse_head(sub_typed) == (struct_name, Any[:D], :Number)
        @test _parse_head(kitchen_sink) == (struct_name, [:T1, :(T2 <: AbstractVector{T1})], :(AbstractVector{T1}))
    end

    @testset "_strip_super" begin
        @test _strip_super(struct_name) == struct_name
        @test _strip_super(kitchen_sink) == :(MyStruct{T1, T2<:AbstractVector{T1}})
        @test _strip_super([struct_name, sub_typed]) == [struct_name, :(MyStruct{D})]
    end

    @testset "_get_subparams" begin
        @test _get_subparams(struct_name) == []
        @test _get_subparams([:T1, :(T2<:AbstractArray{T1,N}), :(T3<:Complex{T1})]) == Any[:T1, :N, :T1]
    end

    @testset "_get_constructor_params" begin
        @test _get_constructor_params([:T, :(A<:AbstractVector{T})], [:A, :B]) == []
        @test _get_constructor_params([:iip, :T, :(A<:AbstractVector{T})], [:A, :B]) == [:iip]
        @test _get_constructor_params([:iip, :T, :(A<:AbstractVector{T}), :B], [:B]) == [:iip, :A]
    end
end

# # End-to-end tests

# Test setup
@concrete struct Plain end
plain = Plain()

@concrete terse struct PlainTerse end
plain_terse = PlainTerse()

"test"
@concrete struct PlainDoc end
plain_doc = PlainDoc()

"test"
@concrete terse struct PlainTerseDoc end
plain_terse_doc = PlainTerseDoc()

@concrete struct Args
    a
    b
end
args = Args(1+im, "hi")

@concrete terse struct ArgsTerse <: Number
    a
    b
end
args_terse = ArgsTerse(1+im, "hi")

@concrete mutable struct SubtypedMutable <: Number
    a
    b
end
subtyped_mutable = SubtypedMutable(3.0, 4f0)

@concrete struct Partial{A}
    # Hey there, I'm a comment
    a::A

    "And I'm a docsctring"
    b
end
partial = Partial(:yo, 1//2)

@concrete mutable struct ConstructorMutable{iip,C}
    a
    b
    c::C
end
ConstructorMutable(a,b,c) = ConstructorMutable{true}(a,b,eltype(a)(c))
constructor_mutable = ConstructorMutable([1.0+im, 2], 'r', 1.5)
constructor_mutable.b = 'h'

@concrete terse struct TerseSameType{A}
    a::A
    b::A
end
function TerseSameType(a::A, b::B) where {A,B}
    T = promote_type(A, B)
    return TerseSameType{T}(T(a), T(b))
end
terse_same_type = TerseSameType(1+im, 5f0)

@concrete terse struct FullyParameterized{B}
    a::Symbol
    b::B
end
fully_parameterized = FullyParameterized(:sine, sin)

@concrete mutable struct ParameterizedSubtyped{T,N,B<:AbstractArray{T,N}} <: AbstractArray{T,N}
    a
    b::B
    c::T
end
parameterized_subtyped = ParameterizedSubtyped(:🏦, [1, 2, 3], 4)
Base.size(x::ParameterizedSubtyped) = size(x.b)
Base.getindex(x::ParameterizedSubtyped, i...) = x.b[i...]

@concrete terse struct HangingTypeParam{iip}
    a
    b
end
hanging_type_param = HangingTypeParam{true}(1, 2.0)

@concrete terse struct HangingTypeParam2{iip,B}
    a
    b::B
end
hanging_type_param2 = HangingTypeParam2{true}(1, 2.0)

Base.@kwdef @concrete struct KWDef
    a = "ayyy"
    b::Float64 = 4.0
    c<:Real = 3
    d
    e::Float64
    f<:Real
end
kwdef = KWDef(d="hi", e=2.0, f=1//2)

# Run tests
@testset "End-to-end tests" begin
    @test_throws ErrorException args.a = 2+im
    @test_throws MethodError subtyped_mutable.a = "hi"

    @test typeof(partial) |> isconcretetype
    @test typeof(terse_same_type.a) === typeof(terse_same_type.b)
    @test typeof(fully_parameterized.a) |> isconcretetype
    @test eltype(parameterized_subtyped.b) === typeof(parameterized_subtyped.c)
    @test typeof(kwdef) |> isconcretetype

    @test @capture_out(show(stdout, MIME("text/plain"), typeof(fully_parameterized))) == "FullyParameterized{typeof(sin)}"
    @test @capture_out(show(stdout, FullyParameterized)) == "FullyParameterized"
    @test @capture_out(show(stdout, hanging_type_param)) == "HangingTypeParam{true}(1, 2.0)"
    @test @capture_out(show(stdout, MIME("text/plain"), ArgsTerse)) == "ArgsTerse"
end

@testset "Issue #3" begin
    @concrete struct Foo{T<:Real}
        x::T
        y<:Real
        z<:AbstractMatrix{T}
    end

    foo = Foo(1, 1.0, [1, 2]')

    @test typeof(foo) === Foo{Int, Float64, Adjoint{Int, Vector{Int}}}
end


text:
using HTTP, JSON3, Profile, BenchmarkTools
using Base.Threads: @spawn

# https://juliafolds.github.io/data-parallelism/tutorials/concurrency-patterns/

umap(f, xs; kwargs...) = umap(f, Any, xs; kwargs...)
function umap(f, TY::Type, xs::Channel; ntasks = Threads.nthreads(), buffersize = ntasks)
    return Channel{TY}(buffersize) do ys
        @sync for i in 1:ntasks
            @spawn for x in xs
                put!(ys, f(i, x))
            end
        end
    end
end

function calc(nworkers = 10, nreqs = 100)
    xs = Channel{Int}(Inf)
    for _ in 1:nreqs
        put!(xs, 1)
    end
    close(xs)

    res = umap(Int, xs; ntasks = nworkers, buffersize = nreqs) do name, n
        #println("worker-$name")
        response = HTTP.request("GET", "https://qrng.anu.edu.au/API/jsonI.php?length=$(n)&type=uint16"; cookies=true, pipeline_limit = 100, reuse_limit = 100)
        json = JSON3.read(String(response.body))
        sum(json["data"])
    end

    collect(res)
end

ext: jl

max_stars_repo_name: StatisticalMice/julia-tutorials

max_issues_repo_name: StatisticalMice/julia-tutorials

max_forks_repo_name: StatisticalMice/julia-tutorials


text:
@info "RoMEPlotting is loading tools based on ImageMagick.jl"

import Base: convert

export convert

"""
    $SIGNATURES

Use PNG from Cairo and Fontconfig to convert a Gadfly plot into a Julia Images style matrix.

Example
```julia
pl = Gadlfy.plot(y=randn(10), Geom.line)
convert(Matrix{RGB}, pl)
```
"""
function convert(::Type{<:AbstractArray{<:Color, 2}}, pl::Gadfly.Plot)
  buf = IOBuffer()
  pl |> PNG(buf)
  plbytes = take!(buf)
  ImageMagick.readblob(plbytes)
end


text:
const edge_table = (0x0109, 0x0203, 0x030a, 0x0406, 0x050f,
                    0x0605, 0x070c, 0x080c, 0x0905, 0x0a0f, 0x0b06,
                    0x0c0a, 0x0d03, 0x0e09, 0x0f00, 0x0190, 0x0099,
                    0x0393, 0x029a, 0x0596, 0x049f, 0x0795, 0x069c,
                    0x099c, 0x0895, 0x0b9f, 0x0a96, 0x0d9a, 0x0c93,
                    0x0f99, 0x0e90, 0x0230, 0x0339, 0x0033, 0x013a,
                    0x0636, 0x073f, 0x0435, 0x053c, 0x0a3c, 0x0b35,
                    0x083f, 0x0936, 0x0e3a, 0x0f33, 0x0c39, 0x0d30,
                    0x03a0, 0x02a9, 0x01a3, 0x00aa, 0x07a6, 0x06af,
                    0x05a5, 0x04ac, 0x0bac, 0x0aa5, 0x09af, 0x08a6,
                    0x0faa, 0x0ea3, 0x0da9, 0x0ca0, 0x0460, 0x0569,
                    0x0663, 0x076a, 0x0066, 0x016f, 0x0265, 0x036c,
                    0x0c6c, 0x0d65, 0x0e6f, 0x0f66, 0x086a, 0x0963,
                    0x0a69, 0x0b60, 0x05f0, 0x04f9, 0x07f3, 0x06fa,
                    0x01f6, 0x00ff, 0x03f5, 0x02fc, 0x0dfc, 0x0cf5,
                    0x0fff, 0x0ef6, 0x09fa, 0x08f3, 0x0bf9, 0x0af0,
                    0x0650, 0x0759, 0x0453, 0x055a, 0x0256, 0x035f,
                    0x0055, 0x015c, 0x0e5c, 0x0f55, 0x0c5f, 0x0d56,
                    0x0a5a, 0x0b53, 0x0859, 0x0950, 0x07c0, 0x06c9,
                    0x05c3, 0x04ca, 0x03c6, 0x02cf, 0x01c5, 0x00cc,
                    0x0fcc, 0x0ec5, 0x0dcf, 0x0cc6, 0x0bca, 0x0ac3,
                    0x09c9, 0x08c0, 0x08c0, 0x09c9, 0x0ac3, 0x0bca,
                    0x0cc6, 0x0dcf, 0x0ec5, 0x0fcc, 0x00cc, 0x01c5,
                    0x02cf, 0x03c6, 0x04ca, 0x05c3, 0x06c9, 0x07c0,
                    0x0950, 0x0859, 0x0b53, 0x0a5a, 0x0d56, 0x0c5f,
                    0x0f55, 0x0e5c, 0x015c, 0x0055, 0x035f, 0x0256,
                    0x055a, 0x0453, 0x0759, 0x0650, 0x0af0, 0x0bf9,
                    0x08f3, 0x09fa, 0x0ef6, 0x0fff, 0x0cf5, 0x0dfc,
                    0x02fc, 0x03f5, 0x00ff, 0x01f6, 0x06fa, 0x07f3,
                    0x04f9, 0x05f0, 0x0b60, 0x0a69, 0x0963, 0x086a,
                    0x0f66, 0x0e6f, 0x0d65, 0x0c6c, 0x036c, 0x0265,
                    0x016f, 0x0066, 0x076a, 0x0663, 0x0569, 0x0460,
                    0x0ca0, 0x0da9, 0x0ea3, 0x0faa, 0x08a6, 0x09af,
                    0x0aa5, 0x0bac, 0x04ac, 0x05a5, 0x06af, 0x07a6,
                    0x00aa, 0x01a3, 0x02a9, 0x03a0, 0x0d30, 0x0c39,
                    0x0f33, 0x0e3a, 0x0936, 0x083f, 0x0b35, 0x0a3c,
                    0x053c, 0x0435, 0x073f, 0x0636, 0x013a, 0x0033,
                    0x0339, 0x0230, 0x0e90, 0x0f99, 0x0c93, 0x0d9a,
                    0x0a96, 0x0b9f, 0x0895, 0x099c, 0x069c, 0x0795,
                    0x049f, 0x0596, 0x029a, 0x0393, 0x0099, 0x0190,
                    0x0f00, 0x0e09, 0x0d03, 0x0c0a, 0x0b06, 0x0a0f,
                    0x0905, 0x080c, 0x070c, 0x0605, 0x050f, 0x0406,
                    0x030a, 0x0203, 0x0109)

const tri_table = ( (0x01, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x09, 0x04, 0x0a, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x02, 0x03, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x03, 0x0b, 0x01, 0x03, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x09, 0x04, 0x03, 0x0b, 0x09, 0x0b, 0x0a, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0c, 0x03, 0x09, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0a, 0x01, 0x03, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0c, 0x03, 0x02, 0x0a, 0x0c, 0x0a, 0x09, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0b, 0x02, 0x0c, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0b, 0x02, 0x01, 0x09, 0x0b, 0x09, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0a, 0x01, 0x04, 0x0c, 0x0a, 0x0c, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x09, 0x0b, 0x0b, 0x09, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x04, 0x01, 0x08, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x02, 0x0a, 0x05, 0x08, 0x02, 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x05, 0x08, 0x04, 0x01, 0x05, 0x02, 0x03, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x03, 0x0b, 0x0a, 0x01, 0x03, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x0b, 0x0a, 0x03, 0x0a, 0x08, 0x03, 0x08, 0x04, 0x08, 0x0a, 0x05, 0x00, 0x00, 0x00),
                    (0x09, 0x05, 0x08, 0x04, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x05, 0x08, 0x0c, 0x03, 0x05, 0x03, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x01, 0x02, 0x09, 0x05, 0x08, 0x03, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x08, 0x0c, 0x0a, 0x05, 0x0c, 0x0a, 0x0c, 0x03, 0x0a, 0x03, 0x02, 0x00, 0x00, 0x00),
                    (0x04, 0x0b, 0x02, 0x04, 0x0c, 0x0b, 0x08, 0x09, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0c, 0x0b, 0x02, 0x05, 0x0c, 0x02, 0x01, 0x05, 0x08, 0x0c, 0x05, 0x00, 0x00, 0x00),
                    (0x05, 0x08, 0x09, 0x0a, 0x01, 0x0c, 0x0a, 0x0c, 0x0b, 0x0c, 0x01, 0x04, 0x00, 0x00, 0x00),
                    (0x05, 0x08, 0x0c, 0x05, 0x0c, 0x0a, 0x0a, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x01, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x06, 0x05, 0x02, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x06, 0x05, 0x09, 0x04, 0x06, 0x04, 0x02, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x0a, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x09, 0x02, 0x03, 0x0b, 0x05, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x03, 0x0b, 0x06, 0x05, 0x03, 0x05, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x0b, 0x06, 0x04, 0x03, 0x06, 0x04, 0x06, 0x05, 0x04, 0x05, 0x09, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x03, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0c, 0x03, 0x01, 0x09, 0x0c, 0x05, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x06, 0x05, 0x01, 0x02, 0x06, 0x03, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x02, 0x06, 0x03, 0x06, 0x09, 0x03, 0x09, 0x0c, 0x05, 0x09, 0x06, 0x00, 0x00, 0x00),
                    (0x0b, 0x04, 0x0c, 0x0b, 0x02, 0x04, 0x0a, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0a, 0x06, 0x01, 0x09, 0x02, 0x09, 0x0b, 0x02, 0x09, 0x0c, 0x0b, 0x00, 0x00, 0x00),
                    (0x06, 0x05, 0x01, 0x06, 0x01, 0x0c, 0x06, 0x0c, 0x0b, 0x0c, 0x01, 0x04, 0x00, 0x00, 0x00),
                    (0x06, 0x05, 0x09, 0x06, 0x09, 0x0b, 0x0b, 0x09, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x08, 0x09, 0x06, 0x08, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x04, 0x01, 0x0a, 0x06, 0x04, 0x06, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x08, 0x09, 0x01, 0x02, 0x08, 0x02, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x06, 0x04, 0x04, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x08, 0x09, 0x0a, 0x06, 0x08, 0x0b, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x02, 0x03, 0x0a, 0x06, 0x01, 0x06, 0x04, 0x01, 0x06, 0x08, 0x04, 0x00, 0x00, 0x00),
                    (0x09, 0x01, 0x03, 0x09, 0x03, 0x06, 0x09, 0x06, 0x08, 0x0b, 0x06, 0x03, 0x00, 0x00, 0x00),
                    (0x03, 0x0b, 0x06, 0x03, 0x06, 0x04, 0x04, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x0a, 0x06, 0x08, 0x09, 0x0a, 0x04, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x08, 0x0a, 0x08, 0x03, 0x0a, 0x03, 0x01, 0x03, 0x08, 0x0c, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x0c, 0x01, 0x02, 0x09, 0x02, 0x08, 0x09, 0x02, 0x06, 0x08, 0x00, 0x00, 0x00),
                    (0x0c, 0x03, 0x02, 0x0c, 0x02, 0x08, 0x08, 0x02, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x09, 0x09, 0x06, 0x08, 0x0b, 0x02, 0x04, 0x0b, 0x04, 0x0c, 0x00, 0x00, 0x00),
                    (0x06, 0x08, 0x01, 0x06, 0x01, 0x0a, 0x08, 0x0c, 0x01, 0x02, 0x01, 0x0b, 0x0c, 0x0b, 0x01),
                    (0x0c, 0x0b, 0x01, 0x0c, 0x01, 0x04, 0x0b, 0x06, 0x01, 0x09, 0x01, 0x08, 0x06, 0x08, 0x01),
                    (0x0c, 0x0b, 0x06, 0x08, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x01, 0x02, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x09, 0x04, 0x02, 0x0a, 0x09, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x07, 0x06, 0x03, 0x07, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x07, 0x06, 0x02, 0x03, 0x07, 0x04, 0x01, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x07, 0x06, 0x0a, 0x01, 0x07, 0x01, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x0a, 0x09, 0x06, 0x09, 0x03, 0x06, 0x03, 0x07, 0x04, 0x03, 0x09, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x0c, 0x0b, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x01, 0x09, 0x0c, 0x03, 0x01, 0x0b, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x03, 0x04, 0x0c, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x0b, 0x07, 0x02, 0x0a, 0x03, 0x0a, 0x0c, 0x03, 0x0a, 0x09, 0x0c, 0x00, 0x00, 0x00),
                    (0x07, 0x04, 0x0c, 0x07, 0x06, 0x04, 0x06, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x0c, 0x01, 0x0c, 0x06, 0x01, 0x06, 0x02, 0x06, 0x0c, 0x07, 0x00, 0x00, 0x00),
                    (0x04, 0x0c, 0x07, 0x01, 0x04, 0x07, 0x01, 0x07, 0x06, 0x01, 0x06, 0x0a, 0x00, 0x00, 0x00),
                    (0x07, 0x06, 0x0a, 0x07, 0x0a, 0x0c, 0x0c, 0x0a, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x0b, 0x07, 0x05, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x04, 0x01, 0x05, 0x08, 0x04, 0x07, 0x06, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0a, 0x01, 0x06, 0x0b, 0x07, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x07, 0x06, 0x02, 0x0a, 0x08, 0x02, 0x08, 0x04, 0x08, 0x0a, 0x05, 0x00, 0x00, 0x00),
                    (0x07, 0x02, 0x03, 0x07, 0x06, 0x02, 0x05, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x06, 0x06, 0x03, 0x07, 0x04, 0x01, 0x05, 0x04, 0x05, 0x08, 0x00, 0x00, 0x00),
                    (0x09, 0x05, 0x08, 0x0a, 0x01, 0x06, 0x01, 0x07, 0x06, 0x01, 0x03, 0x07, 0x00, 0x00, 0x00),
                    (0x08, 0x04, 0x0a, 0x08, 0x0a, 0x05, 0x04, 0x03, 0x0a, 0x06, 0x0a, 0x07, 0x03, 0x07, 0x0a),
                    (0x04, 0x0c, 0x03, 0x08, 0x09, 0x05, 0x0b, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x0b, 0x07, 0x05, 0x08, 0x03, 0x05, 0x03, 0x01, 0x03, 0x08, 0x0c, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x05, 0x08, 0x09, 0x03, 0x04, 0x0c, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00),
                    (0x0a, 0x03, 0x02, 0x0a, 0x0c, 0x03, 0x0a, 0x05, 0x0c, 0x08, 0x0c, 0x05, 0x06, 0x0b, 0x07),
                    (0x09, 0x05, 0x08, 0x04, 0x0c, 0x06, 0x04, 0x06, 0x02, 0x06, 0x0c, 0x07, 0x00, 0x00, 0x00),
                    (0x06, 0x02, 0x0c, 0x06, 0x0c, 0x07, 0x02, 0x01, 0x0c, 0x08, 0x0c, 0x05, 0x01, 0x05, 0x0c),
                    (0x01, 0x06, 0x0a, 0x01, 0x07, 0x06, 0x01, 0x04, 0x07, 0x0c, 0x07, 0x04, 0x09, 0x05, 0x08),
                    (0x07, 0x06, 0x0a, 0x07, 0x0a, 0x0c, 0x05, 0x08, 0x0a, 0x08, 0x0c, 0x0a, 0x00, 0x00, 0x00),
                    (0x0b, 0x05, 0x0a, 0x07, 0x05, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0b, 0x07, 0x05, 0x0a, 0x0b, 0x01, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x01, 0x02, 0x0b, 0x07, 0x01, 0x07, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x04, 0x02, 0x09, 0x02, 0x07, 0x09, 0x07, 0x05, 0x07, 0x02, 0x0b, 0x00, 0x00, 0x00),
                    (0x02, 0x05, 0x0a, 0x02, 0x03, 0x05, 0x03, 0x07, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x09, 0x02, 0x03, 0x0a, 0x03, 0x05, 0x0a, 0x03, 0x07, 0x05, 0x00, 0x00, 0x00),
                    (0x01, 0x03, 0x05, 0x05, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x04, 0x03, 0x09, 0x03, 0x05, 0x05, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x05, 0x0a, 0x0b, 0x07, 0x05, 0x0c, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x03, 0x03, 0x09, 0x0c, 0x05, 0x0a, 0x0b, 0x05, 0x0b, 0x07, 0x00, 0x00, 0x00),
                    (0x04, 0x0c, 0x03, 0x01, 0x02, 0x07, 0x01, 0x07, 0x05, 0x07, 0x02, 0x0b, 0x00, 0x00, 0x00),
                    (0x07, 0x05, 0x02, 0x07, 0x02, 0x0b, 0x05, 0x09, 0x02, 0x03, 0x02, 0x0c, 0x09, 0x0c, 0x02),
                    (0x0a, 0x07, 0x05, 0x0a, 0x04, 0x07, 0x0a, 0x02, 0x04, 0x0c, 0x07, 0x04, 0x00, 0x00, 0x00),
                    (0x09, 0x0c, 0x02, 0x09, 0x02, 0x01, 0x0c, 0x07, 0x02, 0x0a, 0x02, 0x05, 0x07, 0x05, 0x02),
                    (0x04, 0x0c, 0x07, 0x04, 0x07, 0x01, 0x01, 0x07, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x05, 0x09, 0x0c, 0x07, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x0b, 0x07, 0x08, 0x09, 0x0b, 0x09, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x08, 0x04, 0x01, 0x0b, 0x08, 0x01, 0x0a, 0x0b, 0x07, 0x08, 0x0b, 0x00, 0x00, 0x00),
                    (0x0b, 0x07, 0x08, 0x02, 0x0b, 0x08, 0x02, 0x08, 0x09, 0x02, 0x09, 0x01, 0x00, 0x00, 0x00),
                    (0x0b, 0x07, 0x08, 0x0b, 0x08, 0x02, 0x02, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x07, 0x02, 0x07, 0x09, 0x02, 0x09, 0x0a, 0x09, 0x07, 0x08, 0x00, 0x00, 0x00),
                    (0x03, 0x07, 0x0a, 0x03, 0x0a, 0x02, 0x07, 0x08, 0x0a, 0x01, 0x0a, 0x04, 0x08, 0x04, 0x0a),
                    (0x08, 0x09, 0x01, 0x08, 0x01, 0x07, 0x07, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x04, 0x03, 0x07, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x0c, 0x0b, 0x07, 0x09, 0x0b, 0x09, 0x0a, 0x09, 0x07, 0x08, 0x00, 0x00, 0x00),
                    (0x03, 0x01, 0x08, 0x03, 0x08, 0x0c, 0x01, 0x0a, 0x08, 0x07, 0x08, 0x0b, 0x0a, 0x0b, 0x08),
                    (0x02, 0x09, 0x01, 0x02, 0x08, 0x09, 0x02, 0x0b, 0x08, 0x07, 0x08, 0x0b, 0x03, 0x04, 0x0c),
                    (0x0c, 0x03, 0x02, 0x0c, 0x02, 0x08, 0x0b, 0x07, 0x02, 0x07, 0x08, 0x02, 0x00, 0x00, 0x00),
                    (0x09, 0x0a, 0x07, 0x09, 0x07, 0x08, 0x0a, 0x02, 0x07, 0x0c, 0x07, 0x04, 0x02, 0x04, 0x07),
                    (0x01, 0x0a, 0x02, 0x0c, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x09, 0x01, 0x08, 0x01, 0x07, 0x04, 0x0c, 0x01, 0x0c, 0x07, 0x01, 0x00, 0x00, 0x00),
                    (0x08, 0x0c, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x09, 0x0c, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x0c, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x02, 0x0a, 0x09, 0x04, 0x02, 0x0c, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x02, 0x03, 0x07, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x04, 0x01, 0x09, 0x07, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x0a, 0x01, 0x03, 0x0b, 0x0a, 0x07, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x0c, 0x08, 0x03, 0x0b, 0x04, 0x0b, 0x09, 0x04, 0x0b, 0x0a, 0x09, 0x00, 0x00, 0x00),
                    (0x08, 0x03, 0x04, 0x07, 0x03, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x01, 0x09, 0x08, 0x07, 0x01, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x08, 0x07, 0x03, 0x04, 0x08, 0x01, 0x02, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x07, 0x03, 0x02, 0x09, 0x07, 0x02, 0x0a, 0x09, 0x09, 0x08, 0x07, 0x00, 0x00, 0x00),
                    (0x0b, 0x08, 0x07, 0x0b, 0x02, 0x08, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x08, 0x07, 0x02, 0x08, 0x0b, 0x02, 0x09, 0x08, 0x02, 0x01, 0x09, 0x00, 0x00, 0x00),
                    (0x01, 0x04, 0x08, 0x01, 0x08, 0x0b, 0x01, 0x0b, 0x0a, 0x07, 0x0b, 0x08, 0x00, 0x00, 0x00),
                    (0x08, 0x07, 0x0b, 0x08, 0x0b, 0x09, 0x09, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x09, 0x05, 0x0c, 0x09, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x07, 0x0c, 0x04, 0x01, 0x07, 0x01, 0x05, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x07, 0x0c, 0x09, 0x05, 0x07, 0x0a, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x05, 0x07, 0x0a, 0x07, 0x04, 0x0a, 0x04, 0x02, 0x0c, 0x04, 0x07, 0x00, 0x00, 0x00),
                    (0x07, 0x09, 0x05, 0x07, 0x0c, 0x09, 0x03, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x04, 0x01, 0x0c, 0x01, 0x07, 0x0c, 0x01, 0x05, 0x07, 0x00, 0x00, 0x00),
                    (0x05, 0x0c, 0x09, 0x05, 0x07, 0x0c, 0x01, 0x03, 0x0a, 0x03, 0x0b, 0x0a, 0x00, 0x00, 0x00),
                    (0x0b, 0x0a, 0x04, 0x0b, 0x04, 0x03, 0x0a, 0x05, 0x04, 0x0c, 0x04, 0x07, 0x05, 0x07, 0x04),
                    (0x09, 0x03, 0x04, 0x09, 0x05, 0x03, 0x05, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x05, 0x03, 0x05, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0a, 0x01, 0x03, 0x04, 0x05, 0x03, 0x05, 0x07, 0x05, 0x04, 0x09, 0x00, 0x00, 0x00),
                    (0x02, 0x0a, 0x05, 0x02, 0x05, 0x03, 0x03, 0x05, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x02, 0x04, 0x09, 0x07, 0x02, 0x09, 0x05, 0x07, 0x07, 0x0b, 0x02, 0x00, 0x00, 0x00),
                    (0x0b, 0x02, 0x01, 0x0b, 0x01, 0x07, 0x07, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x07, 0x04, 0x05, 0x04, 0x09, 0x07, 0x0b, 0x04, 0x01, 0x04, 0x0a, 0x0b, 0x0a, 0x04),
                    (0x0b, 0x0a, 0x05, 0x07, 0x0b, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0a, 0x06, 0x08, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x05, 0x0a, 0x06, 0x0c, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x01, 0x02, 0x06, 0x05, 0x01, 0x08, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x08, 0x07, 0x09, 0x04, 0x05, 0x04, 0x06, 0x05, 0x04, 0x02, 0x06, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x0b, 0x02, 0x03, 0x08, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x0c, 0x08, 0x02, 0x03, 0x0b, 0x01, 0x09, 0x04, 0x05, 0x0a, 0x06, 0x00, 0x00, 0x00),
                    (0x08, 0x07, 0x0c, 0x06, 0x05, 0x0b, 0x05, 0x03, 0x0b, 0x05, 0x01, 0x03, 0x00, 0x00, 0x00),
                    (0x04, 0x05, 0x09, 0x04, 0x06, 0x05, 0x04, 0x03, 0x06, 0x0b, 0x06, 0x03, 0x0c, 0x08, 0x07),
                    (0x08, 0x03, 0x04, 0x08, 0x07, 0x03, 0x06, 0x05, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x01, 0x09, 0x07, 0x01, 0x07, 0x03, 0x07, 0x09, 0x08, 0x00, 0x00, 0x00),
                    (0x04, 0x07, 0x03, 0x04, 0x08, 0x07, 0x02, 0x06, 0x01, 0x06, 0x05, 0x01, 0x00, 0x00, 0x00),
                    (0x07, 0x03, 0x09, 0x07, 0x09, 0x08, 0x03, 0x02, 0x09, 0x05, 0x09, 0x06, 0x02, 0x06, 0x09),
                    (0x0a, 0x06, 0x05, 0x0b, 0x02, 0x07, 0x02, 0x08, 0x07, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00),
                    (0x02, 0x07, 0x0b, 0x02, 0x08, 0x07, 0x02, 0x01, 0x08, 0x09, 0x08, 0x01, 0x0a, 0x06, 0x05),
                    (0x05, 0x01, 0x0b, 0x05, 0x0b, 0x06, 0x01, 0x04, 0x0b, 0x07, 0x0b, 0x08, 0x04, 0x08, 0x0b),
                    (0x08, 0x07, 0x0b, 0x08, 0x0b, 0x09, 0x06, 0x05, 0x0b, 0x05, 0x09, 0x0b, 0x00, 0x00, 0x00),
                    (0x07, 0x0a, 0x06, 0x07, 0x0c, 0x0a, 0x0c, 0x09, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x07, 0x0c, 0x01, 0x07, 0x04, 0x01, 0x06, 0x07, 0x01, 0x0a, 0x06, 0x00, 0x00, 0x00),
                    (0x01, 0x0c, 0x09, 0x01, 0x06, 0x0c, 0x01, 0x02, 0x06, 0x06, 0x07, 0x0c, 0x00, 0x00, 0x00),
                    (0x07, 0x0c, 0x04, 0x07, 0x04, 0x06, 0x06, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x0a, 0x06, 0x0c, 0x0a, 0x0c, 0x09, 0x0c, 0x06, 0x07, 0x00, 0x00, 0x00),
                    (0x01, 0x0c, 0x04, 0x01, 0x07, 0x0c, 0x01, 0x0a, 0x07, 0x06, 0x07, 0x0a, 0x02, 0x03, 0x0b),
                    (0x0c, 0x09, 0x06, 0x0c, 0x06, 0x07, 0x09, 0x01, 0x06, 0x0b, 0x06, 0x03, 0x01, 0x03, 0x06),
                    (0x07, 0x0c, 0x04, 0x07, 0x04, 0x06, 0x03, 0x0b, 0x04, 0x0b, 0x06, 0x04, 0x00, 0x00, 0x00),
                    (0x06, 0x09, 0x0a, 0x06, 0x03, 0x09, 0x06, 0x07, 0x03, 0x04, 0x09, 0x03, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x07, 0x0a, 0x07, 0x01, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x06, 0x09, 0x02, 0x09, 0x01, 0x06, 0x07, 0x09, 0x04, 0x09, 0x03, 0x07, 0x03, 0x09),
                    (0x02, 0x06, 0x07, 0x03, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x04, 0x07, 0x02, 0x07, 0x0b, 0x04, 0x09, 0x07, 0x06, 0x07, 0x0a, 0x09, 0x0a, 0x07),
                    (0x0b, 0x02, 0x01, 0x0b, 0x01, 0x07, 0x0a, 0x06, 0x01, 0x06, 0x07, 0x01, 0x00, 0x00, 0x00),
                    (0x01, 0x04, 0x09, 0x06, 0x07, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x06, 0x0b, 0x08, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x06, 0x0b, 0x0c, 0x08, 0x06, 0x09, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x0c, 0x08, 0x06, 0x0b, 0x0c, 0x02, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x08, 0x06, 0x0b, 0x0c, 0x08, 0x0a, 0x09, 0x02, 0x09, 0x04, 0x02, 0x00, 0x00, 0x00),
                    (0x0c, 0x02, 0x03, 0x0c, 0x08, 0x02, 0x08, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x02, 0x03, 0x08, 0x02, 0x08, 0x06, 0x08, 0x03, 0x0c, 0x00, 0x00, 0x00),
                    (0x0a, 0x08, 0x06, 0x0a, 0x03, 0x08, 0x0a, 0x01, 0x03, 0x03, 0x0c, 0x08, 0x00, 0x00, 0x00),
                    (0x08, 0x06, 0x03, 0x08, 0x03, 0x0c, 0x06, 0x0a, 0x03, 0x04, 0x03, 0x09, 0x0a, 0x09, 0x03),
                    (0x03, 0x06, 0x0b, 0x03, 0x04, 0x06, 0x04, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x03, 0x01, 0x09, 0x06, 0x03, 0x09, 0x08, 0x06, 0x0b, 0x03, 0x06, 0x00, 0x00, 0x00),
                    (0x0a, 0x01, 0x02, 0x06, 0x0b, 0x04, 0x06, 0x04, 0x08, 0x04, 0x0b, 0x03, 0x00, 0x00, 0x00),
                    (0x0a, 0x09, 0x03, 0x0a, 0x03, 0x02, 0x09, 0x08, 0x03, 0x0b, 0x03, 0x06, 0x08, 0x06, 0x03),
                    (0x02, 0x04, 0x06, 0x04, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x08, 0x01, 0x08, 0x02, 0x02, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x01, 0x04, 0x0a, 0x04, 0x06, 0x06, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x09, 0x08, 0x06, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x09, 0x05, 0x06, 0x0b, 0x09, 0x0b, 0x0c, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x01, 0x05, 0x06, 0x0c, 0x01, 0x06, 0x0b, 0x0c, 0x0c, 0x04, 0x01, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x09, 0x05, 0x0b, 0x09, 0x0b, 0x0c, 0x0b, 0x05, 0x06, 0x00, 0x00, 0x00),
                    (0x0b, 0x0c, 0x05, 0x0b, 0x05, 0x06, 0x0c, 0x04, 0x05, 0x0a, 0x05, 0x02, 0x04, 0x02, 0x05),
                    (0x03, 0x06, 0x02, 0x03, 0x09, 0x06, 0x03, 0x0c, 0x09, 0x05, 0x06, 0x09, 0x00, 0x00, 0x00),
                    (0x01, 0x05, 0x0c, 0x01, 0x0c, 0x04, 0x05, 0x06, 0x0c, 0x03, 0x0c, 0x02, 0x06, 0x02, 0x0c),
                    (0x01, 0x03, 0x06, 0x01, 0x06, 0x0a, 0x03, 0x0c, 0x06, 0x05, 0x06, 0x09, 0x0c, 0x09, 0x06),
                    (0x0a, 0x05, 0x06, 0x03, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x06, 0x0b, 0x04, 0x06, 0x03, 0x04, 0x05, 0x06, 0x04, 0x09, 0x05, 0x00, 0x00, 0x00),
                    (0x06, 0x0b, 0x03, 0x06, 0x03, 0x05, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0b, 0x03, 0x04, 0x06, 0x0b, 0x04, 0x09, 0x06, 0x05, 0x06, 0x09, 0x01, 0x02, 0x0a),
                    (0x06, 0x0b, 0x03, 0x06, 0x03, 0x05, 0x02, 0x0a, 0x03, 0x0a, 0x05, 0x03, 0x00, 0x00, 0x00),
                    (0x09, 0x05, 0x06, 0x09, 0x06, 0x04, 0x04, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x05, 0x06, 0x02, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x05, 0x06, 0x09, 0x06, 0x04, 0x0a, 0x01, 0x06, 0x01, 0x04, 0x06, 0x00, 0x00, 0x00),
                    (0x0a, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0c, 0x08, 0x05, 0x0a, 0x0c, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x05, 0x0a, 0x08, 0x0a, 0x0c, 0x08, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00),
                    (0x02, 0x0b, 0x0c, 0x02, 0x0c, 0x05, 0x02, 0x05, 0x01, 0x08, 0x05, 0x0c, 0x00, 0x00, 0x00),
                    (0x04, 0x02, 0x05, 0x04, 0x05, 0x09, 0x02, 0x0b, 0x05, 0x08, 0x05, 0x0c, 0x0b, 0x0c, 0x05),
                    (0x05, 0x0c, 0x08, 0x0a, 0x0c, 0x05, 0x0a, 0x03, 0x0c, 0x0a, 0x02, 0x03, 0x00, 0x00, 0x00),
                    (0x0a, 0x08, 0x05, 0x0a, 0x0c, 0x08, 0x0a, 0x02, 0x0c, 0x03, 0x0c, 0x02, 0x01, 0x09, 0x04),
                    (0x0c, 0x08, 0x05, 0x0c, 0x05, 0x03, 0x03, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x08, 0x05, 0x0c, 0x05, 0x03, 0x09, 0x04, 0x05, 0x04, 0x03, 0x05, 0x00, 0x00, 0x00),
                    (0x03, 0x0a, 0x0b, 0x03, 0x08, 0x0a, 0x03, 0x04, 0x08, 0x08, 0x05, 0x0a, 0x00, 0x00, 0x00),
                    (0x0a, 0x0b, 0x08, 0x0a, 0x08, 0x05, 0x0b, 0x03, 0x08, 0x09, 0x08, 0x01, 0x03, 0x01, 0x08),
                    (0x04, 0x08, 0x0b, 0x04, 0x0b, 0x03, 0x08, 0x05, 0x0b, 0x02, 0x0b, 0x01, 0x05, 0x01, 0x0b),
                    (0x02, 0x0b, 0x03, 0x09, 0x08, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0a, 0x02, 0x05, 0x02, 0x08, 0x08, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0a, 0x02, 0x05, 0x02, 0x08, 0x01, 0x09, 0x02, 0x09, 0x08, 0x02, 0x00, 0x00, 0x00),
                    (0x05, 0x01, 0x04, 0x08, 0x05, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x09, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x0b, 0x09, 0x0b, 0x0c, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x0a, 0x04, 0x0a, 0x0c, 0x0c, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0b, 0x01, 0x0b, 0x09, 0x09, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x02, 0x0b, 0x0c, 0x04, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0c, 0x02, 0x0c, 0x0a, 0x0a, 0x0c, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x0a, 0x04, 0x0a, 0x0c, 0x02, 0x03, 0x0a, 0x03, 0x0c, 0x0a, 0x00, 0x00, 0x00),
                    (0x01, 0x03, 0x0c, 0x09, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x09, 0x03, 0x09, 0x0b, 0x0b, 0x09, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x0b, 0x03, 0x01, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x09, 0x03, 0x09, 0x0b, 0x01, 0x02, 0x09, 0x02, 0x0b, 0x09, 0x00, 0x00, 0x00),
                    (0x02, 0x0b, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x04, 0x09, 0x0a, 0x02, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x04, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00))

const _mc_verts = ((0x01, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x09, 0x04, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x02, 0x03, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x03, 0x0b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x09, 0x04, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0c, 0x03, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0a, 0x01, 0x03, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0c, 0x03, 0x0a, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0b, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0b, 0x02, 0x09, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0a, 0x01, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x09, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x04, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x02, 0x0a, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x05, 0x08, 0x01, 0x02, 0x03, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x03, 0x0b, 0x01, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x0b, 0x0a, 0x08, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x05, 0x08, 0x04, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x05, 0x08, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x01, 0x02, 0x09, 0x05, 0x08, 0x03, 0x04, 0x0c, 0x00, 0x00, 0x00),
                    (0x05, 0x08, 0x0c, 0x0a, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0b, 0x02, 0x0c, 0x08, 0x09, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0c, 0x0b, 0x05, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x08, 0x09, 0x0a, 0x01, 0x0c, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x08, 0x0c, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x01, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x06, 0x05, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x06, 0x05, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x0a, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x09, 0x02, 0x03, 0x0b, 0x05, 0x0a, 0x06, 0x00, 0x00, 0x00),
                    (0x06, 0x03, 0x0b, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x0b, 0x06, 0x04, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x03, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0c, 0x03, 0x09, 0x05, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x06, 0x05, 0x02, 0x03, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x02, 0x06, 0x09, 0x0c, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x04, 0x0c, 0x02, 0x0a, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0a, 0x06, 0x01, 0x09, 0x02, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x05, 0x01, 0x0c, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x05, 0x09, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x08, 0x09, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x04, 0x01, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x08, 0x09, 0x02, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x06, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x08, 0x09, 0x06, 0x0b, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x02, 0x03, 0x0a, 0x06, 0x01, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x01, 0x03, 0x06, 0x08, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x0b, 0x06, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x0a, 0x06, 0x09, 0x04, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x08, 0x03, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x0c, 0x01, 0x02, 0x09, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x03, 0x02, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x09, 0x08, 0x0b, 0x02, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x08, 0x01, 0x0a, 0x0c, 0x02, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x0b, 0x01, 0x04, 0x06, 0x09, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x0b, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x01, 0x02, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x09, 0x04, 0x0a, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x07, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x07, 0x06, 0x03, 0x04, 0x01, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x07, 0x06, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x0a, 0x09, 0x03, 0x07, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x0c, 0x0b, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x01, 0x09, 0x03, 0x0b, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x03, 0x04, 0x0c, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00),
                    (0x06, 0x0b, 0x07, 0x02, 0x0a, 0x03, 0x0c, 0x09, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x04, 0x0c, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x0c, 0x06, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0c, 0x07, 0x01, 0x06, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x06, 0x0a, 0x0c, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x0b, 0x07, 0x05, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x04, 0x01, 0x08, 0x07, 0x06, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0a, 0x01, 0x06, 0x0b, 0x07, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00),
                    (0x0b, 0x07, 0x06, 0x02, 0x0a, 0x08, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x02, 0x03, 0x06, 0x05, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x06, 0x07, 0x04, 0x01, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x05, 0x08, 0x0a, 0x01, 0x06, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x04, 0x0a, 0x05, 0x03, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0c, 0x03, 0x08, 0x09, 0x05, 0x0b, 0x07, 0x06, 0x00, 0x00, 0x00),
                    (0x06, 0x0b, 0x07, 0x05, 0x08, 0x03, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x05, 0x08, 0x09, 0x03, 0x04, 0x0c, 0x06, 0x0b, 0x07),
                    (0x0a, 0x03, 0x02, 0x0c, 0x05, 0x08, 0x06, 0x0b, 0x07, 0x00, 0x00, 0x00),
                    (0x09, 0x05, 0x08, 0x04, 0x0c, 0x06, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x02, 0x0c, 0x07, 0x01, 0x08, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x06, 0x0a, 0x07, 0x04, 0x0c, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00),
                    (0x07, 0x06, 0x0a, 0x0c, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x05, 0x0a, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0b, 0x07, 0x0a, 0x01, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x01, 0x02, 0x07, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x04, 0x02, 0x07, 0x05, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x05, 0x0a, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x09, 0x02, 0x03, 0x0a, 0x05, 0x07, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x03, 0x05, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x04, 0x03, 0x05, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x05, 0x0a, 0x07, 0x0c, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x03, 0x0c, 0x05, 0x0a, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0c, 0x03, 0x01, 0x02, 0x07, 0x05, 0x0b, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x05, 0x02, 0x0b, 0x09, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x07, 0x05, 0x04, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x0c, 0x02, 0x01, 0x07, 0x0a, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0c, 0x07, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x05, 0x09, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x0b, 0x07, 0x09, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x08, 0x04, 0x0b, 0x0a, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x07, 0x08, 0x02, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x07, 0x08, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x07, 0x09, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x07, 0x0a, 0x02, 0x08, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x09, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x04, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x0c, 0x0b, 0x07, 0x09, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x01, 0x08, 0x0c, 0x0a, 0x07, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x09, 0x01, 0x08, 0x0b, 0x07, 0x03, 0x04, 0x0c, 0x00, 0x00, 0x00),
                    (0x0c, 0x03, 0x02, 0x08, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x0a, 0x07, 0x08, 0x02, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0a, 0x02, 0x0c, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x09, 0x01, 0x07, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x0c, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x09, 0x0c, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x0c, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x02, 0x0a, 0x04, 0x0c, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x02, 0x03, 0x07, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x04, 0x01, 0x09, 0x07, 0x0c, 0x08, 0x00, 0x00, 0x00),
                    (0x03, 0x0a, 0x01, 0x0b, 0x07, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x0c, 0x08, 0x03, 0x0b, 0x04, 0x09, 0x0a, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x03, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x01, 0x09, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x08, 0x07, 0x04, 0x01, 0x02, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x07, 0x03, 0x09, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x08, 0x07, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x08, 0x07, 0x02, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x04, 0x08, 0x0b, 0x0a, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x07, 0x0b, 0x09, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x09, 0x05, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x07, 0x0c, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x07, 0x0c, 0x05, 0x0a, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x05, 0x07, 0x04, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x09, 0x05, 0x0c, 0x03, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x04, 0x01, 0x0c, 0x07, 0x05, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0c, 0x09, 0x07, 0x01, 0x03, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x0a, 0x04, 0x03, 0x05, 0x0c, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x03, 0x04, 0x05, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x05, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0a, 0x01, 0x03, 0x04, 0x05, 0x07, 0x09, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0a, 0x05, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x02, 0x04, 0x07, 0x05, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x02, 0x01, 0x07, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x07, 0x04, 0x09, 0x0b, 0x01, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x0a, 0x05, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0a, 0x06, 0x08, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x05, 0x0a, 0x06, 0x0c, 0x08, 0x07, 0x00, 0x00, 0x00),
                    (0x06, 0x01, 0x02, 0x05, 0x08, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x08, 0x07, 0x09, 0x04, 0x05, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x0b, 0x02, 0x03, 0x08, 0x07, 0x0c, 0x00, 0x00, 0x00),
                    (0x07, 0x0c, 0x08, 0x02, 0x03, 0x0b, 0x01, 0x09, 0x04, 0x05, 0x0a, 0x06),
                    (0x08, 0x07, 0x0c, 0x06, 0x05, 0x0b, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x05, 0x09, 0x06, 0x03, 0x0b, 0x0c, 0x08, 0x07, 0x00, 0x00, 0x00),
                    (0x08, 0x03, 0x04, 0x07, 0x06, 0x05, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x01, 0x09, 0x07, 0x03, 0x08, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x07, 0x03, 0x08, 0x02, 0x06, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x03, 0x09, 0x08, 0x02, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x05, 0x0b, 0x02, 0x07, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x07, 0x0b, 0x08, 0x01, 0x09, 0x0a, 0x06, 0x05, 0x00, 0x00, 0x00),
                    (0x05, 0x01, 0x0b, 0x06, 0x04, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x07, 0x0b, 0x09, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x0a, 0x06, 0x0c, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x07, 0x0c, 0x01, 0x06, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0c, 0x09, 0x06, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x0c, 0x04, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0b, 0x0a, 0x06, 0x0c, 0x09, 0x07, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0c, 0x04, 0x07, 0x0a, 0x06, 0x02, 0x03, 0x0b, 0x00, 0x00, 0x00),
                    (0x0c, 0x09, 0x06, 0x07, 0x01, 0x0b, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x07, 0x0c, 0x04, 0x06, 0x03, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x09, 0x0a, 0x03, 0x07, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x06, 0x07, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x06, 0x09, 0x01, 0x07, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x06, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x04, 0x07, 0x0b, 0x09, 0x06, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x02, 0x01, 0x07, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x04, 0x09, 0x06, 0x07, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x06, 0x0b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x06, 0x0b, 0x08, 0x09, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x0c, 0x08, 0x0b, 0x02, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x08, 0x06, 0x0c, 0x0a, 0x09, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x02, 0x03, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x02, 0x03, 0x08, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x08, 0x06, 0x03, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x08, 0x06, 0x03, 0x0c, 0x0a, 0x04, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x06, 0x0b, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x03, 0x01, 0x06, 0x08, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x01, 0x02, 0x06, 0x0b, 0x04, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x09, 0x03, 0x02, 0x08, 0x0b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x04, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x08, 0x02, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x01, 0x04, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x09, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x09, 0x05, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x01, 0x05, 0x0c, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0a, 0x09, 0x05, 0x0b, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00),
                    (0x0b, 0x0c, 0x05, 0x06, 0x04, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x06, 0x02, 0x09, 0x0c, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x05, 0x0c, 0x04, 0x06, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x03, 0x06, 0x0a, 0x0c, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x05, 0x06, 0x03, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x06, 0x0b, 0x04, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x06, 0x0b, 0x03, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x0b, 0x03, 0x06, 0x09, 0x05, 0x01, 0x02, 0x0a, 0x00, 0x00, 0x00),
                    (0x06, 0x0b, 0x03, 0x05, 0x02, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x05, 0x06, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x05, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x09, 0x05, 0x06, 0x04, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0c, 0x08, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x09, 0x04, 0x05, 0x0a, 0x08, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0b, 0x0c, 0x05, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x02, 0x05, 0x09, 0x0b, 0x08, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0c, 0x08, 0x0a, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x08, 0x05, 0x0c, 0x02, 0x03, 0x01, 0x09, 0x04, 0x00, 0x00, 0x00),
                    (0x0c, 0x08, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0c, 0x08, 0x05, 0x03, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x0a, 0x0b, 0x08, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x0b, 0x08, 0x05, 0x03, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x08, 0x0b, 0x03, 0x05, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0b, 0x03, 0x09, 0x08, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0a, 0x02, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x0a, 0x02, 0x08, 0x01, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x01, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x05, 0x09, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x0b, 0x09, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x0a, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x02, 0x0b, 0x09, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x02, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x03, 0x0c, 0x0a, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x01, 0x0a, 0x0c, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x03, 0x0c, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x04, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x09, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x0a, 0x0b, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x03, 0x04, 0x09, 0x0b, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x0b, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x02, 0x04, 0x09, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                    (0x01, 0x04, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00))

# equvalency mapping table to _mc_connectivity
const _mc_eq_mapping = (0x01, 0x01, 0x02, 0x01, 0x03, 0x02, 0x04, 0x01, 0x02, 0x03, 0x04,
                        0x02, 0x04, 0x04, 0x05, 0x01, 0x02, 0x03, 0x04, 0x03, 0x06, 0x06,
                        0x07, 0x03, 0x04, 0x08, 0x09, 0x06, 0x0a, 0x0b, 0x0c, 0x01, 0x03,
                        0x02, 0x04, 0x03, 0x08, 0x04, 0x09, 0x03, 0x06, 0x06, 0x0d, 0x06,
                        0x0e, 0x07, 0x0c, 0x02, 0x04, 0x04, 0x05, 0x06, 0x0e, 0x0d, 0x0c,
                        0x06, 0x07, 0x0e, 0x0c, 0x0f, 0x10, 0x10, 0x11, 0x01, 0x03, 0x03,
                        0x06, 0x02, 0x06, 0x04, 0x0d, 0x03, 0x06, 0x08, 0x0e, 0x04, 0x07,
                        0x09, 0x0c, 0x03, 0x06, 0x08, 0x0b, 0x06, 0x0f, 0x0e, 0x10, 0x08,
                        0x0b, 0x12, 0x13, 0x0b, 0x10, 0x13, 0x14, 0x02, 0x06, 0x04, 0x07,
                        0x04, 0x0e, 0x05, 0x0c, 0x06, 0x0f, 0x0b, 0x10, 0x0a, 0x10, 0x0c,
                        0x11, 0x04, 0x0a, 0x09, 0x0c, 0x07, 0x10, 0x0c, 0x11, 0x0b, 0x10,
                        0x13, 0x14, 0x10, 0x03, 0x14, 0x01, 0x01, 0x03, 0x03, 0x06, 0x03,
                        0x08, 0x06, 0x0e, 0x02, 0x04, 0x06, 0x15, 0x04, 0x16, 0x0d, 0x0c,
                        0x02, 0x04, 0x06, 0x0d, 0x06, 0x0e, 0x17, 0x10, 0x04, 0x18, 0x0b,
                        0x0c, 0x15, 0x0c, 0x10, 0x11, 0x03, 0x08, 0x06, 0x0e, 0x08, 0x12,
                        0x0e, 0x13, 0x06, 0x0b, 0x17, 0x10, 0x0e, 0x13, 0x10, 0x14, 0x04,
                        0x16, 0x15, 0x0c, 0x0b, 0x13, 0x10, 0x14, 0x0a, 0x0c, 0x10, 0x11,
                        0x10, 0x14, 0x03, 0x01, 0x02, 0x06, 0x06, 0x17, 0x04, 0x0b, 0x15,
                        0x10, 0x04, 0x0a, 0x0b, 0x10, 0x18, 0x0c, 0x0c, 0x11, 0x04, 0x15,
                        0x0b, 0x10, 0x0a, 0x10, 0x10, 0x03, 0x16, 0x0c, 0x13, 0x14, 0x0c,
                        0x11, 0x14, 0x01, 0x04, 0x0e, 0x0d, 0x10, 0x16, 0x13, 0x0c, 0x14,
                        0x15, 0x10, 0x10, 0x03, 0x0c, 0x14, 0x11, 0x01, 0x18, 0x0c, 0x0c,
                        0x11, 0x0c, 0x14, 0x11, 0x01, 0x0c, 0x11, 0x14, 0x01, 0x11, 0x01, 0x01)

const _mc_connectivity = ((0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x04, 0x02, 0x04, 0x05, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x03, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x04, 0x02, 0x05, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x03, 0x04, 0x01, 0x04, 0x05, 0x04, 0x03, 0x06, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x04, 0x01, 0x03, 0x04, 0x03, 0x05, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x04, 0x02, 0x01, 0x05, 0x04, 0x06, 0x02, 0x04, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x04, 0x06, 0x07, 0x06, 0x05, 0x08, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x03, 0x04, 0x04, 0x03, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x03, 0x04, 0x01, 0x04, 0x05, 0x06, 0x04, 0x03, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x07, 0x06, 0x05, 0x08, 0x07, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x03, 0x02, 0x04, 0x05, 0x06, 0x07, 0x05, 0x07, 0x08, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x03, 0x04, 0x02, 0x05, 0x03, 0x06, 0x03, 0x07, 0x05, 0x07, 0x03),
                            (0x01, 0x02, 0x03, 0x04, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x04, 0x02, 0x01, 0x05, 0x04, 0x06, 0x04, 0x05, 0x07, 0x08, 0x09),
                            (0x01, 0x02, 0x03, 0x01, 0x03, 0x04, 0x05, 0x06, 0x03, 0x06, 0x04, 0x03, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x04, 0x02, 0x01, 0x05, 0x04, 0x04, 0x06, 0x02, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x04, 0x05, 0x02, 0x04, 0x06, 0x05, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x01, 0x04, 0x02, 0x05, 0x06, 0x07, 0x06, 0x08, 0x07, 0x00, 0x00, 0x00),
                            (0x01, 0x02, 0x03, 0x02, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00))

const _mc_edge_list = ((0x01, 0x02), (0x02, 0x03), (0x03, 0x04), (0x04, 0x01),
                        (0x05, 0x06), (0x06, 0x07), (0x07, 0x08), (0x08, 0x05),
                        (0x01, 0x05), (0x02, 0x06), (0x03, 0x07), (0x04, 0x08))


text:
# It turns out that this works OK for starting points 10*x_init and
# 100*x_init.  Interesting, the Fortran code does _not_ run the case
# 1*x_init.   It looks like it converges to a different minimum from
# that starting point.
const expmax = 1.999 * log(sqrt(0.999*floatmax()))
const expmin = 1.999 * log(sqrt(1.001*floatmin()))

const box = let res_init=zeros(10), jac_init=zeros(10,3), x_init=[0.0, 1.0, 2.0]

    function res(x, r)
        -expmax > minimum(x) && throw("Error in box residual")
        for i = 1:10
            ti = -0.1 * Float64(i)
            t1 = ti * x[1]
            e1 = t1 > expmin ? exp(t1) : 0.0
            t2 = ti*x[2]
            e2 = t2 > expmin ? exp(t2) : 0.0
            r[i] = (e1 - e2) - x[3]*(exp(ti) - exp(10.0 * ti))
        end
        return r
    end

    function jac(x, jac)
        for i = 1:10
            ti = -0.1 * Float64(i)
            t = x[1] * ti
            e = t > expmin ? exp(t) : 0.0
            jac[i, 1] = ti * e
            t = x[2] * ti
            e = t > expmin ? exp(t) : 0.0
            jac[i, 2] = -ti * e
            jac[i, 3] = exp(10.0 * ti) - exp(ti)
        end
        return jac
    end

    f(;scale=1, verbose=false, print_steps=false) = testone("box", res, jac,
                                                   res_init, jac_init, x_init;
                                                   scale=scale, verbose=verbose,
                                                   print_steps=print_steps)
end


text:
module  TestDataExploration

using PopGen
using DataFrames
using Test

cats = @nancycats;

@testset "Data Exploration" begin

    @testset "missing data" begin
        @test missingdata(cats) isa DataFrame
        @test missingdata(cats, by = "population") isa DataFrame
        @test missingdata(cats, by = "locus") isa DataFrame
        @test missingdata(cats, by = "full") isa DataFrame
    end

    @testset "pairwise identical" begin
        pw_i = pairwiseidentical(cats)
        @test pw_i isa DataFrame
        @test size(pw_i) == (27966, 4)
        pw_i_2 = pairwiseidentical(cats, cats.sampleinfo.name[1:10])
        @test pw_i_2 isa DataFrame
        @test size(pw_i_2) == (45, 4)
    end

    @testset "frequency tables" begin
        @test genofreqtable(cats) isa DataFrame
        @test genofreqtable(cats, by = "population") isa DataFrame
        @test allelefreqtable(cats) isa DataFrame
        @test allelefreqtable(cats, by = "population") isa DataFrame
    end
end

end # module


text:
using JuMP
using Gurobi
using StatsBase
using DataFrames
using CSV
include("SupportFunction.jl")
include("DataLoad.jl")
println("Leeeeroooy Jenkins")
#Esben's path
path = "$(homedir())/Documents/GitHub/Thesis/Data/MonthlyReturns"

mainData = loadIndexDataNoDurLOGReturn(path)
mainDataArr = Array(mainData)

startRow = 1
endRow = 100
trainingObservations = 100
mainXarr = mainDataArr[startRow:endRow,1:10]
indexes = size(mainXarr)[2]

#### WITH RISK AVERSION

nRows = size(mainDataArr)[1]
nCols = size(mainDataArr)[2]

##LOOP TO TEST IT
portfolioClassTotal = []
portfolioClassTotal = push!(portfolioClassTotal, 1)
portfolioClassIndividual = []
portfolioClassIndividual = push!(portfolioClassIndividual, 0)
wClasstracker = zeros((nRows-trainingObservations-1),10)

wClass = repeat([0.1], outer = 10)
portfolioClassTotal = []
portfolioClassTotal = push!(portfolioClassTotal, 1)
portfolioClassIndividual = []
portfolioClassIndividual = push!(portfolioClassIndividual, 0)

for rStart = 1:(nRows-trainingObservations-1)
    startRow = rStart
    endRow = rStart+trainingObservations
    mainXarr = mainDataArr[startRow:endRow,1:10]
    indexes = size(mainXarr)[2]

    #creating the covariance matrix of the training data
    Sigma = cov(mainXarr)

    #creating the mean of the returns for SAA (forecasts should be used instead)
    LassoOutputHere = [1, 0, 0, 1, 1, 0, 0, 1, 1, 0]
    indicators = LassoOutputHere
    wStar = createWeighting(indicators)

    wMVtracker[rStart,:] = wStar

    #creating the forecastRow in arithmetic returns (not log returns)
    #then we can multiply and sum across the row
    forecastRow = exp(mainDataArr[(endRow+1):(endRow+1),1:10])

    periodReturn = Array(forecastRow*wStar)[1]
    currentLength = length(portfolioClassTotal)
    portfolioClassTotal = push!(portfolioClassTotal, portfolioClassTotal[currentLength]*periodReturn)
    portfolioClassIndividual = push!(portfolioClassIndividual, periodReturn)

    period1NReturn = Array(forecastRow*w1N)[1]
    current1NLength = length(portfolio1NTotal)
    portfolio1NTotal = push!(portfolio1NTotal, portfolio1NTotal[current1NLength]*period1NReturn)
    portfolio1NIndividual = push!(portfolio1NIndividual, period1NReturn)
end

#Checking the total return of the portfolio by checking last index
portfolioClassTotal[length(portfolioClassTotal)]
portfolio1NTotal[length(portfolio1NTotal)]

portfolioClassTotal = convert(Array{Float64,1}, portfolioClassTotal)
portfolioClassIndividual = convert(Array{Float64,1}, portfolioClassIndividual)
(mean(portfolioClassIndividual)-1)*100
std(portfolioClassIndividual)
SharpeRatioMV = (mean(portfolioClassIndividual)-1)/std(portfolioClassIndividual)

portfolio1NTotal = convert(Array{Float64,1}, portfolio1NTotal)
portfolio1NIndividual = convert(Array{Float64,1}, portfolio1NIndividual)
(mean(portfolio1NIndividual)-1)*100
std(portfolio1NIndividual)
SharpeRatio1N = (mean(portfolio1NIndividual)-1)/std(portfolio1NIndividual)

combinedPortfolios = hcat(portfolioClassTotal, portfolio1NTotal, portfolioClassIndividual, portfolio1NIndividual)
writedlm("Class100obsversus1N.csv", combinedPortfolios,",")

writedlm("Class100obsPortfolioWeights.csv", wMVtracker,",")

max_stars_repo_name: skipperafrosenborg/Thesis

max_issues_repo_name: skipperafrosenborg/Thesis

max_forks_repo_name: skipperafrosenborg/Thesis


text:
""" Declaration of the original types used in the algorithm """

################################ ENUMS ################################

@enum Pruned OPTIMALITY INFEASIBILITY DOMINANCE NONE

################################ STRUCTS ################################

# for storing a problem
struct BiOKP
	nbVar::Int
	nbObj::Int
	profits::Array{Float64,2}
	weights::Array{Float64,1}
	maxWeight::Float64
	isInteger::Bool
end

# for storing a solution
mutable struct Sol
	x::Vector{Float64}
	y::Vector{Float64}
	w::Float64
	isBinary::Bool
end

# for storing a specific assignment for a BiOKP
mutable struct Assignment
	assign::Vector{Int}
	profit::Vector{Float64}
	weight::Float64
	lastAssigned::Int
end

# for storing a pair of solutions
struct PairOfSolution
	solL::Sol
	solR::Sol
end

# for storing upper bounds
struct DualSet
	A::Array{Float64, 2}
	b::Array{Float64, 1}
end

# for storing known solutions that are present in the parent and the child node
mutable struct ParentToChild
    knownSols::LinkedList{Sol} # solutions that are identical from the parent to the child node
    previousIndicies::LinkedList{Int} # indicies of the knownSols inside the parent UB
    rightSol::Sol # the last solution of knownSols list. The one on the right.
    leftKnown::Bool # the left sol of the parent is a known sol
    rightKnown::Bool # the right sol of the parent is a known sol
end

# for couting the number of subproblems studied
mutable struct Iterator
	value::Int
end

################################ LOWER BOUND  ################################

mutable struct LowerBound
    sols::LinkedList{Sol}
end

################################ UPPER BOUND  ################################

mutable struct UpperBound
    sols::LinkedList{Sol}
    segments::DualSet
    explicit::Bool # wether we use the explicit fathoming test of not, if false, then segments is not defined
end

################################ CONSTRUCTORS ################################

# PROBLEM ######################

function BiOKP()
    return BiOKP(6, 2, [11 2 8 10 9 1; 2 7 8 4 1 3], [4, 4, 6, 4, 3, 2], 11, true)
end

function BiOKP(nbVar::Int, nbObj::Int, profits::Array{Float64,2}, weights::Array{Float64, 1}, maxWeight::Float64)
	return BiOKP(nbVar, nbObj, profits, weights, maxWeight, false)
end

function BiOKP(fname::String)
	f = open(fname)

    nbVar, nbObj = parse.(Int, split(readline(f)))

	profits = zeros(Float64, nbObj, nbVar)
	weights = zeros(Float64, nbVar)

	for iter = 1:nbObj
		profits[iter, 1:end] = parse.(Float64, split(readline(f)))
	end

	weights = parse.(Float64, split(readline(f)))

	maxWeight = parse(Float64, readline(f))

    readline(f) == "true" ? isInteger = true : isInteger = false

	close(f)

	return BiOKP(nbVar, nbObj, profits, weights, maxWeight, isInteger)
end

function BiOKP(nbVar::Int; isInteger::Bool = true)
    if isInteger
        weights = rand(1:50, nbVar)
        maxWeight = Int(ceil(sum(weights) / 2.5))
        return BiOKP(nbVar, 2, rand(1:50, 2, nbVar), weights, maxWeight <= 50 ? 51 : maxWeight, true)
    else
        weights = rand(Float64, nbVar) * 49 .+ 1
        maxWeight = sum(weights) / 2.5
        return BiOKP(nbVar, 2, rand(Float64, 2, nbVar) * 49 .+ 1, weights, maxWeight <= 50 ? 51 : maxWeight, false)
    end
end

# SOLUTION ######################

function Sol()
	return Sol( Vector{Float64}(), Vector{Float64}(), 0., false)
end

function Sol(x::Vector{Float64}, y::Vector{Float64}, w::Float64)
	return Sol(x, y, w, true)
end

# ASSIGNMENT ######################

function Assignment()
	return Assignment(Vector{Int}(), Vector{Float64}(), 0, 0)
end

function Assignment(prob::BiOKP)
	return Assignment(ones(Int, prob.nbVar)*-1, zeros(Float64, prob.nbObj), 0, 0)
end

# PAIR OF SOLUTION ######################

function PairOfSolution()
	return PairOfSolution(Sol(),Sol())
end

# DUAL SET #############################

function DualSet()
    return DualSet(Matrix{Float64}(undef, 0, 2), Vector{Float64}(undef, 0))
end

# FROM PARENT TO CHILD ######################

function ParentToChild()
    return ParentToChild(nil(Sol),nil(Int),Sol(),false,false)
end

# ITERATOR ######################

function Iterator()
	return Iterator(0)
end

# LOWER BOUND ######################

function LowerBound()
    return LowerBound(nil(Sol))
end

# UPPER BOUND ######################

function UpperBound()
    return UpperBound(nil(Sol), DualSet(), false)
end

function UpperBound(sols::LinkedList{Sol})
    return UpperBound(sols, DualSet(), false)
end

function UB_setSegments!(UB::UpperBound, segments::DualSet)
    UB.segments = segments
    UB.explicit = true
end

################################ OPERATORS ################################

import Base.:(==), Base.:(!=)

Base.:(==)(sol1::Sol, sol2::Sol) = sol1.y == sol2.y
Base.:(==)(pair1::PairOfSolution, pair2::PairOfSolution) = pair1.solL == pair2.solL && pair1.solR == pair2.solR
Base.:(==)(x::DualSet, y::DualSet) = (x.A == y.A) && (x.b == y.b)
Base.:(!=)(pair1::PairOfSolution, pair2::PairOfSolution) = !(pair1 == pair2)

################################ COPY ################################

import Base.copy
Base.copy(sol::Sol) = Sol(copy(sol.x), copy(sol.y), sol.w, sol.isBinary)

################################ SHOW ################################

# ELEMENTS ######################

function Base.show(io::IO, sol::Sol)
    index = 0
    i = 1
    while index == 0 && i < length(sol.x)
        if sol.x[i] > 0. && sol.x[i] < 1.
            index = i
        end
        i += 1
    end
    print(io,"$(sol.y)")
end

function Base.show(io::IO, pair::PairOfSolution)
    print(io,"($(pair.solL.y),$(pair.solR.y))")
end

# LISTS ######################

function Base.show(io::IO, linkedL::LinkedList{Sol})
    print(io, "\n")
    for sol in linkedL
        println(io, "$(sol)")
    end
    println(io, "")
end

function Base.show(io::IO, vec::Vector{Sol})
    print(io, "\n")
    for sol in vec
        println(io, "$(sol)")
    end
    println(io, "")
end

function Base.show(io::IO, vec::Vector{PairOfSolution})
    print(io,"\n")
    for elt in vec
        println(io, "$(elt.solL.y),$(elt.solR.y)")
    end
    println(io,"")
end


text:
# Visualize simulations
# This file is only loaded when GLMakie is imported

using .GLMakie

function visualize(coord_logger,
                    box_size,
                    out_filepath::AbstractString;
                    connections=Tuple{Int, Int}[],
                    connection_frames=[trues(length(connections)) for i in coord_logger.coords],
                    trails::Integer=0,
                    framerate::Integer=30,
                    color=:purple,
                    connection_color=:orange,
                    markersize=20.0,
                    linewidth=2.0,
                    transparency=true,
                    kwargs...)
    coords_start = first(coord_logger.coords)
    dims = length(first(coords_start))
    if dims == 3
        PointType = Point3f
    elseif dims == 2
        PointType = Point2f
    else
        throw(ArgumentError("Found $dims dimensions but can only visualize 2 or 3 dimensions"))
    end

    scene = Scene()
    positions = Node(PointType.(ustrip_vec.(coords_start)))
    scatter!(scene, positions; color=color, markersize=markersize,
                transparency=transparency, kwargs...)

    connection_nodes = []
    for (ci, (i, j)) in enumerate(connections)
        if first(connection_frames)[ci] && norm(coords_start[i] - coords_start[j]) < (first(box_size) / 2)
            if dims == 3
                push!(connection_nodes, Node(PointType.(
                        ustrip.([coords_start[i][1], coords_start[j][1]]),
                        ustrip.([coords_start[i][2], coords_start[j][2]]),
                        ustrip.([coords_start[i][3], coords_start[j][3]]))))
            elseif dims == 2
                push!(connection_nodes, Node(PointType.(
                        ustrip.([coords_start[i][1], coords_start[j][1]]),
                        ustrip.([coords_start[i][2], coords_start[j][2]]))))
            end
        else
            if dims == 3
                push!(connection_nodes, Node(PointType.([0.0, 0.0], [0.0, 0.0],
                                                        [0.0, 0.0])))
            elseif dims == 2
                push!(connection_nodes, Node(PointType.([0.0, 0.0], [0.0, 0.0])))
            end
        end
    end
    for (ci, cn) in enumerate(connection_nodes)
        lines!(scene, cn,
                color=isa(connection_color, Array) ? connection_color[ci] : connection_color,
                linewidth=isa(linewidth, Array) ? linewidth[ci] : linewidth,
                transparency=transparency)
    end

    trail_positions = []
    for trail_i in 1:trails
        push!(trail_positions, Node(PointType.(ustrip_vec.(coords_start))))
        col = parse.(Colorant, color)
        alpha = 1 - (trail_i / (trails + 1))
        alpha_col = RGBA.(red.(col), green.(col), blue.(col), alpha)
        scatter!(scene, trail_positions[end]; color=alpha_col,
                    markersize=markersize, transparency=transparency, kwargs...)
    end

    dist_unit = unit(first(first(coords_start)))
    box_size_conv = ustrip.(dist_unit, box_size)
    xlims!(scene, 0.0, box_size_conv[1])
    ylims!(scene, 0.0, box_size_conv[2])
    dims == 3 && zlims!(scene, 0.0, box_size_conv[3])

    GLMakie.record(scene, out_filepath, eachindex(coord_logger.coords); framerate=framerate) do frame_i
        coords = coord_logger.coords[frame_i]

        for (ci, (i, j)) in enumerate(connections)
            if connection_frames[frame_i][ci] && norm(coords[i] - coords[j]) < (first(box_size) / 2)
                if dims == 3
                    connection_nodes[ci][] = PointType.(
                                ustrip.([coords[i][1], coords[j][1]]),
                                ustrip.([coords[i][2], coords[j][2]]),
                                ustrip.([coords[i][3], coords[j][3]]))
                elseif dims == 2
                    connection_nodes[ci][] = PointType.(
                                ustrip.([coords[i][1], coords[j][1]]),
                                ustrip.([coords[i][2], coords[j][2]]))
                end
            else
                if dims == 3
                    connection_nodes[ci][] = PointType.([0.0, 0.0], [0.0, 0.0],
                                                        [0.0, 0.0])
                elseif dims == 2
                    connection_nodes[ci][] = PointType.([0.0, 0.0], [0.0, 0.0])
                end
            end
        end

        positions[] = PointType.(ustrip_vec.(coords))
        for (trail_i, trail_position) in enumerate(trail_positions)
            trail_position[] = PointType.(ustrip_vec.(coord_logger.coords[max(frame_i - trail_i, 1)]))
        end
    end
end


text:
# Read entity data and organize into sparse associative array.

# Entity data are derived summaries obtained by from automated
# entity extraction algorithms applied to <1% of the NIST Rueters Corpus.
# See: http://trec.nist.gov/data/reuters/reuters.html

using JLD, FileIO, PyPlot, SparseArrays

# Load data
file_dir = joinpath(Base.source_dir(),"./Entity.csv")
save_dir = joinpath(Base.source_dir(),"./Entity.jld")
E = ReadCSV(file_dir)
print(E[1:5,:])

# Grab doc, entity, position, and type columns and combine type and entity with '/' seperator.
row,col,doc_val      = find(E[:,"doc,"])
row,col,entity_val   = find(E[:,"entity,"])
row,col,position_val = find(E[:,"position,"])
row,col,type_val     = find(E[:,"type,"])
typeEntity_val = CatStr(type_val, "/" , entity_val)

# Create a sparse associative array of all the data.
E = Assoc(doc_val,typeEntity_val,position_val)

# Show a few rows and plot a spy plot.
print(E[1:5,:])
figure()
spy(E')

# Save the associative array.
save(save_dir,"E",E)
#saveassoc(save_dir,E)


text:
module MNIST_Tests
using Base.Test
using ColorTypes
using MLDatasets

@testset "Constants" begin
    @test MNIST.Reader.IMAGEOFFSET == 16
    @test MNIST.Reader.LABELOFFSET == 8

    @test MNIST.Reader.TRAINIMAGES == "train-images-idx3-ubyte.gz"
    @test MNIST.Reader.TRAINLABELS == "train-labels-idx1-ubyte.gz"
    @test MNIST.Reader.TESTIMAGES  == "t10k-images-idx3-ubyte.gz"
    @test MNIST.Reader.TESTLABELS  == "t10k-labels-idx1-ubyte.gz"

    @test endswith(MNIST.DEFAULT_DIR, "MLDatasets/datasets/mnist")
end

const _TRAINIMAGES = joinpath(MNIST.DEFAULT_DIR, MNIST.Reader.TRAINIMAGES)
const _TRAINLABELS = joinpath(MNIST.DEFAULT_DIR, MNIST.Reader.TRAINLABELS)
const _TESTIMAGES = joinpath(MNIST.DEFAULT_DIR, MNIST.Reader.TESTIMAGES)
const _TESTLABELS = joinpath(MNIST.DEFAULT_DIR, MNIST.Reader.TESTLABELS)

if isfile(_TRAINIMAGES)
    info("Skipping (pre-)download tests: MNIST dataset already exists.")
    @assert all(map(isfile, [_TRAINIMAGES, _TRAINLABELS, _TESTIMAGES, _TESTLABELS])) "Only some files of the dataset are already present"
else
    @assert all(map(!isfile, [_TRAINIMAGES, _TRAINLABELS, _TESTIMAGES, _TESTLABELS])) "Only some files of the dataset are already present"
    if isinteractive()
        info("Skipping download-error tests: interactive session running.")
    else
        @testset "Pre-download Errors" begin
            @test_throws ErrorException MNIST.download_helper()
            @test_throws ErrorException MNIST.traintensor()
            @test_throws ErrorException MNIST.trainlabels()
            @test_throws ErrorException MNIST.traindata()
            @test_throws ErrorException MNIST.testtensor()
            @test_throws ErrorException MNIST.testlabels()
            @test_throws ErrorException MNIST.testdata()
        end
    end
    @testset "Download" begin
        @test MNIST.download_helper(i_accept_the_terms_of_use=true) == nothing
    end
end

@testset "File Header" begin
    @test MNIST.Reader.readimageheader(_TRAINIMAGES) == (0x803,60000,28,28)
    @test MNIST.Reader.readimageheader(_TESTIMAGES)  == (0x803,10000,28,28)
    @test MNIST.Reader.readlabelheader(_TRAINLABELS) == (0x801,60000)
    @test MNIST.Reader.readlabelheader(_TESTLABELS)  == (0x801,10000)
end

@testset "Images" begin
    # Sanity check that the first trainimage is not the first testimage
    @test MNIST.traintensor(1) != MNIST.testtensor(1)
    # Make sure other integer types work as indicies
    @test MNIST.traintensor(0xBAE) == MNIST.traintensor(2990)

    @testset "Test that traintensor are the train images" begin
        for i = rand(1:60_000, 10)
            @test MNIST.traintensor(i) == MNIST.Reader.readimages(_TRAINIMAGES, i) ./ 255.0
        end
    end
    @testset "Test that testtensor are the test images" begin
        for i = rand(1:10_000, 10)
            @test MNIST.testtensor(i) == MNIST.Reader.readimages(_TESTIMAGES, i) ./ 255.0
        end
    end

    # Test that `readtrainimage` is the horizontal-major layout by
    # comparing to a hand checked result
    @test MNIST.Reader.readimages(_TRAINIMAGES, 1)[11:13,12:14] ==
            [0x00 0x00 0x00;
             0x8b 0x0b 0x00;
             0xfd 0xbe 0x23]
    @test MNIST.traintensor(1, decimal=false)[11:13,12:14] ==
            [0x00 0x00 0x00;
             0x8b 0x0b 0x00;
             0xfd 0xbe 0x23]

    # These tests check if the functions return internaly consistent
    # results for different parameters (e.g. index as int or as vector).
    # That means no matter how you specify an index, you will always
    # get the same result for a specific index.
    for (image_fun, nimages) in ((MNIST.traintensor, 60_000),
                                 (MNIST.testtensor,  10_000))
        @testset "$image_fun" begin
            # whole image set
            A = @inferred image_fun()
            @test typeof(A) <: Array{Float64,3}
            @test size(A) == (28,28,nimages)

            @test_throws AssertionError image_fun(-1)
            @test_throws AssertionError image_fun(0)
            @test_throws AssertionError image_fun(nimages+1)

            @testset "load single images" begin
                # Sample a few random images to compare
                for i = rand(1:nimages, 10)
                    A_i = @inferred image_fun(i)
                    @test typeof(A_i) <: Array{Float64,2}
                    @test size(A_i) == (28,28)
                    @test A_i == A[:,:,i]
                end
            end

            @testset "load multiple images" begin
                A_5_10 = @inferred image_fun(5:10)
                @test typeof(A_5_10) <: Array{Float64,3}
                @test size(A_5_10) == (28,28,6)
                for i = 1:6
                    @test A_5_10[:,:,i] == A[:,:,i+4]
                end

                # also test edge cases `1`, `nimages`
                indices = [10,3,9,1,nimages]
                A_vec   = image_fun(indices)
                A_vec_f = image_fun(Vector{Int32}(indices))
                @test typeof(A_vec)   <: Array{Float64,3}
                @test typeof(A_vec_f) <: Array{Float64,3}
                @test size(A_vec)   == (28,28,5)
                @test size(A_vec_f) == (28,28,5)
                for i in 1:5
                    @test A_vec[:,:,i] == A[:,:,indices[i]]
                    @test A_vec[:,:,i] == A_vec_f[:,:,i]
                end
            end
        end
    end
end

@testset "Labels" begin
    # Sanity check that the first trainlabel is not the first testlabel
    @test MNIST.trainlabels(1) != MNIST.testlabels(1)

    # Check a few hand picked examples. I looked at both the pictures and
    # the native output to make sure these values are correspond to the
    # image at the same index.
    @test MNIST.trainlabels(1) === 5
    @test MNIST.trainlabels(2) === 0
    @test MNIST.trainlabels(1337) === 3
    @test MNIST.trainlabels(0xCAFE) === 6
    @test MNIST.trainlabels(60_000) === 8
    @test MNIST.testlabels(1) === 7
    @test MNIST.testlabels(2) === 2
    @test MNIST.testlabels(0xDAD) === 4
    @test MNIST.testlabels(10_000) === 6

    # These tests check if the functions return internaly consistent
    # results for different parameters (e.g. index as int or as vector).
    # That means no matter how you specify an index, you will always
    # get the same result for a specific index.
    # -- However, technically these tests do not check if these are the
    #    actual MNIST labels of that index!
    for (label_fun, nlabels) in
                ((MNIST.trainlabels, 60_000),
                 (MNIST.testlabels,  10_000))
        @testset "$label_fun" begin
            # whole label set
            A = @inferred label_fun()
            @test typeof(A) <: Vector{Int64}
            @test size(A) == (nlabels,)

            @testset "load single label" begin
                # Sample a few random labels to compare
                for i = rand(1:nlabels, 10)
                    A_i = @inferred label_fun(i)
                    @test typeof(A_i) <: Int64
                    @test A_i == A[i]
                end
            end

            @testset "load multiple labels" begin
                A_5_10 = @inferred label_fun(5:10)
                @test typeof(A_5_10) <: Vector{Int64}
                @test size(A_5_10) == (6,)
                for i = 1:6
                    @test A_5_10[i] == A[i+4]
                end

                # also test edge cases `1`, `nlabels`
                indices = [10,3,9,1,nlabels]
                A_vec   = @inferred label_fun(indices)
                A_vec_f = @inferred label_fun(Vector{Int32}(indices))
                @test typeof(A_vec)   <: Vector{Int64}
                @test typeof(A_vec_f) <: Vector{Int64}
                @test size(A_vec)   == (5,)
                @test size(A_vec_f) == (5,)
                for i in 1:5
                    @test A_vec[i] == A[indices[i]]
                    @test A_vec[i] == A_vec_f[i]
                end
            end
        end
    end
end

# Check against the already tested tensor and labels functions
@testset "Data" begin
    for (data_fun, feature_fun, label_fun, nobs) in
            ((MNIST.traindata, MNIST.traintensor, MNIST.trainlabels, 60_000),
            (MNIST.testdata,  MNIST.testtensor,  MNIST.testlabels,  10_000))
        @testset "check $data_fun against $feature_fun and $label_fun" begin
            data, labels = @inferred data_fun()
            @test data == feature_fun()
            @test labels == label_fun()

            for i = rand(1:nobs, 10)
                d_i, l_i = @inferred data_fun(i)
                @test d_i == feature_fun(i)
                @test l_i == label_fun(i)
            end

            data, labels = @inferred data_fun(5:10)
            @test data == feature_fun(5:10)
            @test labels == label_fun(5:10)

            data, labels = data_fun(5:10, decimal=false)
            @test data == feature_fun(5:10, decimal=false)
            @test labels == label_fun(5:10)

            indices = [10,3,9,1,nobs]
            data, labels = @inferred data_fun(indices)
            @test data == feature_fun(indices)
            @test labels == label_fun(indices)
        end
    end
end

@testset "convert2features" begin
    data = MNIST.traintensor(1)
    @test @inferred(MNIST.convert2features(data)) == vec(data)

    data = MNIST.traintensor(3:4)
    @test @inferred(MNIST.convert2features(data)) == reshape(data, (28*28, 2))
end

@testset "convert2images" begin
    data = MNIST.traintensor(1)
    A = MNIST.convert2image(data)
    @test A[1] == 1.0
    @test size(A) == (28,28)
    @test eltype(A) == Gray{Float64}
    @test MNIST.convert2image(vec(data)) == A

    data = MNIST.traintensor(1:2)
    A = MNIST.convert2image(data)
    @test A[1] == 1.0
    @test size(A) == (28,28,2)
    @test eltype(A) == Gray{Float64}
    @test MNIST.convert2image(vec(data)) == A
    @test MNIST.convert2image(MNIST.convert2features(data)) == A
end

end