class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: G = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: G = None
        self.t: F = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.txt = txt

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

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

e = A("e")
a = B("a")
i = C("i")
f = D("f")
m = E("m")
n = F("n")
b = G("b")
h = H("h")
c = C("c")

e.p = f
e.w = b
e.u = c
e.t = c
a.x = b
a.u = m
a.y = n
a.p = h
i.o = n
i.t = n
i.q = b
i.r = b
i.z = e
f.z = n
f.t = a
f.o = b
m.r = n
m.p = b
m.o = b
m.u = h
m.z = h
m.y = c
n.v = a
n.z = c
b.q = a
b.r = a
b.w = e
b.v = e
b.o = n
b.u = f
h.r = m
c.o = n
c.t = n
c.q = b
c.r = b
c.z = e
assert n.v.u.u.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: G = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: G = None
        self.t: F = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.txt = txt

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

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

e = A("e")
a = B("a")
i = C("i")
f = D("f")
m = E("m")
n = F("n")
b = G("b")
h = H("h")
c = C("c")

e.p = f
e.w = b
e.u = c
e.t = c
a.x = b
a.u = m
a.y = n
a.p = h
i.o = n
i.t = n
i.q = b
i.r = b
i.z = e
f.z = n
f.t = a
f.o = b
m.r = n
m.p = b
m.o = b
m.u = h
m.z = h
m.y = c
n.v = a
n.z = c
b.q = a
b.r = a
b.w = e
b.v = e
b.o = n
b.u = f
h.r = m
c.o = n
c.t = n
c.q = b
c.r = b
c.z = e
assert n.v.u.u.r.z.txt == "h"