class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: G = None
        self.r: G = None
        self.w: G = None
        self.x: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.w: B = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.w: F = None
        self.s: G = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

d = A("d")
b = B("b")
e = C("e")
k = D("k")
l = E("l")
h = F("h")
n = G("n")
j = H("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.w: B = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.w: F = None
        self.s: G = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

d = A("d")
b = B("b")
e = C("e")
k = D("k")
l = E("l")
h = F("h")
n = G("n")
j = H("j")

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