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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: D = None
        self.q: C = None
        self.x: D = None
        self.s: C = None
        self.r: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: A = None
        self.q: E = None
        self.r: G = None
        self.u: B = None
        self.x: H = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: H = None
        self.t: A = None
        self.v: A = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: F = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: D = None
        self.v: G = None
        self.x: A = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: D = None
        self.q: C = None
        self.x: D = None
        self.s: C = None
        self.r: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: A = None
        self.q: E = None
        self.r: G = None
        self.u: B = None
        self.x: H = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: H = None
        self.t: A = None
        self.v: A = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: F = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: D = None
        self.v: G = None
        self.x: A = None
        self.o: C = None
        self.txt = txt

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

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