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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: D = None
        self.p: H = None
        self.s: H = None
        self.o: H = None
        self.w: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.u: A = None
        self.z: F = None
        self.y: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: H = None
        self.z: D = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: G = None
        self.q: E = None
        self.v: D = None
        self.t: C = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: D = None
        self.p: H = None
        self.s: H = None
        self.o: H = None
        self.w: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.u: A = None
        self.z: F = None
        self.y: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: H = None
        self.z: D = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: G = None
        self.q: E = None
        self.v: D = None
        self.t: C = None
        self.r: B = None
        self.txt = txt

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

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