class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: D = None
        self.s: D = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: E = None
        self.q: B = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: E = None
        self.q: B = None
        self.x: F = None
        self.txt = txt

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

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

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