class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.t: H = None
        self.r: E = None
        self.q: B = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.u: A = None
        self.s: A = None
        self.v: F = None
        self.p: H = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.t: H = None
        self.r: D = None
        self.z: D = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.txt = txt

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

e.o = d
e.x = d
e.t = h
e.r = n
e.u = n
e.v = n
e.q = a
a.u = b
b.z = i
d.x = b
d.w = a
d.p = j
d.z = j
n.t = d
n.q = d
n.r = d
n.u = e
n.s = e
n.v = i
n.p = h
i.v = h
i.t = h
i.s = b
i.r = d
i.z = d
i.u = j
f.q = e
f.s = a
h.z = d
h.p = a
j.q = e
j.s = a
assert b.z.t.p.u.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.t: H = None
        self.r: E = None
        self.q: B = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.u: A = None
        self.s: A = None
        self.v: F = None
        self.p: H = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.t: H = None
        self.r: D = None
        self.z: D = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.txt = txt

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

e.o = d
e.x = d
e.t = h
e.r = n
e.u = n
e.v = n
e.q = a
a.u = b
b.z = i
d.x = b
d.w = a
d.p = j
d.z = j
n.t = d
n.q = d
n.r = d
n.u = e
n.s = e
n.v = i
n.p = h
i.v = h
i.t = h
i.s = b
i.r = d
i.z = d
i.u = j
f.q = e
f.s = a
h.z = d
h.p = a
j.q = e
j.s = a
assert b.z.t.p.u.z.t.txt == "h"