class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: D = None
        self.txt = txt

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

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

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

i.x = d
i.t = d
d.s = g
g.x = a
g.z = i
g.q = d
a.u = c
a.t = d
a.s = k
m.w = d
m.x = d
m.q = e
m.t = e
m.r = j
m.v = j
m.s = a
m.p = k
c.s = j
c.v = a
j.q = d
j.v = a
k.v = i
e.x = a
e.z = i
e.q = d
assert k.v.x.s.z.x.s.z.t.txt == "d"