class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.y: G = None
        self.v: D = None
        self.u: H = None
        self.t: G = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.t: H = None
        self.o: A = None
        self.x: E = None
        self.v: F = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.v: B = None
        self.p: G = None
        self.u: A = None
        self.x: F = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

a = A("a")
h = B("h")
n = C("n")
l = D("l")
g = E("g")
m = F("m")
b = G("b")
c = H("c")
j = C("j")

a.x = l
a.o = g
a.t = m
h.q = b
h.z = b
h.y = b
h.t = b
h.v = l
h.u = c
h.w = m
n.p = l
n.u = m
n.v = m
n.t = c
n.o = a
n.x = g
n.z = g
n.y = j
l.s = a
l.u = a
l.w = a
l.t = b
l.p = b
l.o = b
l.v = h
l.x = m
g.o = n
g.w = a
g.q = b
m.y = l
b.z = g
c.q = l
j.p = l
j.u = m
j.v = m
j.t = c
j.o = a
j.x = g
j.z = g
j.y = n
assert j.y.t.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.y: G = None
        self.v: D = None
        self.u: H = None
        self.t: G = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.t: H = None
        self.o: A = None
        self.x: E = None
        self.v: F = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.v: B = None
        self.p: G = None
        self.u: A = None
        self.x: F = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

a = A("a")
h = B("h")
n = C("n")
l = D("l")
g = E("g")
m = F("m")
b = G("b")
c = H("c")
j = C("j")

a.x = l
a.o = g
a.t = m
h.q = b
h.z = b
h.y = b
h.t = b
h.v = l
h.u = c
h.w = m
n.p = l
n.u = m
n.v = m
n.t = c
n.o = a
n.x = g
n.z = g
n.y = j
l.s = a
l.u = a
l.w = a
l.t = b
l.p = b
l.o = b
l.v = h
l.x = m
g.o = n
g.w = a
g.q = b
m.y = l
b.z = g
c.q = l
j.p = l
j.u = m
j.v = m
j.t = c
j.o = a
j.x = g
j.z = g
j.y = n
assert j.y.t.q.v.txt == "h"