class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: D = None
        self.r: A = None
        self.v: D = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.y: C = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.s: B = None
        self.y: D = None
        self.v: H = None
        self.w: A = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.u: C = None
        self.q: F = None
        self.s: A = None
        self.r: D = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: H = None
        self.u: C = None
        self.z: G = None
        self.v: A = None
        self.p: H = None
        self.y: C = None
        self.t: E = None
        self.txt = txt

n = A("n")
a = B("a")
j = C("j")
g = D("g")
b = E("b")
e = F("e")
l = G("l")
i = H("i")
k = H("k")

n.s = a
n.r = a
n.v = l
a.y = g
j.u = a
j.q = g
j.v = g
j.r = n
j.t = n
j.o = l
g.y = b
g.t = a
g.z = l
b.p = j
b.y = j
b.z = n
b.q = l
e.x = b
e.z = l
e.s = a
e.p = a
e.y = g
e.q = g
e.v = k
e.w = n
l.t = n
l.s = n
l.v = k
l.u = j
l.q = e
l.r = g
l.x = g
i.w = j
i.u = j
i.y = j
i.s = k
i.p = k
i.z = l
i.v = n
i.t = b
k.w = j
k.u = j
k.y = j
k.s = i
k.p = i
k.z = l
k.v = n
k.t = b
assert l.q.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: D = None
        self.r: A = None
        self.v: D = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.y: C = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.s: B = None
        self.y: D = None
        self.v: H = None
        self.w: A = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.u: C = None
        self.q: F = None
        self.s: A = None
        self.r: D = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: H = None
        self.u: C = None
        self.z: G = None
        self.v: A = None
        self.p: H = None
        self.y: C = None
        self.t: E = None
        self.txt = txt

n = A("n")
a = B("a")
j = C("j")
g = D("g")
b = E("b")
e = F("e")
l = G("l")
i = H("i")
k = H("k")

n.s = a
n.r = a
n.v = l
a.y = g
j.u = a
j.q = g
j.v = g
j.r = n
j.t = n
j.o = l
g.y = b
g.t = a
g.z = l
b.p = j
b.y = j
b.z = n
b.q = l
e.x = b
e.z = l
e.s = a
e.p = a
e.y = g
e.q = g
e.v = k
e.w = n
l.t = n
l.s = n
l.v = k
l.u = j
l.q = e
l.r = g
l.x = g
i.w = j
i.u = j
i.y = j
i.s = k
i.p = k
i.z = l
i.v = n
i.t = b
k.w = j
k.u = j
k.y = j
k.s = i
k.p = i
k.z = l
k.v = n
k.t = b
assert l.q.x.z.txt == "n"