class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.s: B = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: C = None
        self.z: F = None
        self.t: G = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.s: H = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: F = None
        self.r: H = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.x: B = None
        self.p: H = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: D = None
        self.o: C = None
        self.y: G = None
        self.q: E = None
        self.p: C = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: C = None
        self.z: F = None
        self.t: G = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.s: H = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: F = None
        self.r: H = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.x: B = None
        self.p: H = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: D = None
        self.o: C = None
        self.y: G = None
        self.q: E = None
        self.p: C = None
        self.r: F = None
        self.txt = txt

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

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