class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.v: D = None
        self.o: C = None
        self.y: C = None
        self.z: D = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: E = None
        self.u: E = None
        self.w: C = None
        self.s: C = None
        self.o: F = None
        self.t: F = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: G = None
        self.txt = txt

j = A("j")
g = B("g")
d = C("d")
n = D("n")
a = E("a")
f = F("f")
c = G("c")
k = H("k")
m = E("m")
b = F("b")

j.q = n
j.v = c
j.z = d
g.o = d
g.y = n
g.u = n
g.r = c
g.v = c
g.x = j
g.z = j
g.t = k
d.x = f
d.w = j
d.s = a
n.w = j
n.z = j
n.v = a
a.t = c
a.r = m
a.v = n
a.z = n
a.o = d
a.y = d
a.u = d
f.z = n
f.x = m
f.u = a
f.w = d
f.s = d
f.o = b
f.t = b
f.q = c
c.w = d
c.z = j
c.s = g
k.s = b
k.o = c
m.t = c
m.r = a
m.v = n
m.z = n
m.o = d
m.y = d
m.u = d
b.z = n
b.x = a
b.u = m
b.w = d
b.s = d
b.o = f
b.t = f
b.q = c
assert m.z.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.v: D = None
        self.o: C = None
        self.y: C = None
        self.z: D = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: E = None
        self.u: E = None
        self.w: C = None
        self.s: C = None
        self.o: F = None
        self.t: F = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: G = None
        self.txt = txt

j = A("j")
g = B("g")
d = C("d")
n = D("n")
a = E("a")
f = F("f")
c = G("c")
k = H("k")
m = E("m")
b = F("b")

j.q = n
j.v = c
j.z = d
g.o = d
g.y = n
g.u = n
g.r = c
g.v = c
g.x = j
g.z = j
g.t = k
d.x = f
d.w = j
d.s = a
n.w = j
n.z = j
n.v = a
a.t = c
a.r = m
a.v = n
a.z = n
a.o = d
a.y = d
a.u = d
f.z = n
f.x = m
f.u = a
f.w = d
f.s = d
f.o = b
f.t = b
f.q = c
c.w = d
c.z = j
c.s = g
k.s = b
k.o = c
m.t = c
m.r = a
m.v = n
m.z = n
m.o = d
m.y = d
m.u = d
b.z = n
b.x = a
b.u = m
b.w = d
b.s = d
b.o = f
b.t = f
b.q = c
assert m.z.v.z.txt == "n"