class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.p: B = None
        self.v: B = None
        self.r: C = None
        self.y: B = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: G = None
        self.u: H = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: C = None
        self.w: F = None
        self.r: C = None
        self.x: G = None
        self.v: B = None
        self.s: D = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: G = None
        self.u: H = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: C = None
        self.w: F = None
        self.r: C = None
        self.x: G = None
        self.v: B = None
        self.s: D = None
        self.p: B = None
        self.txt = txt

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

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