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

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

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

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

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

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

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

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

k = A("k")
e = B("e")
m = C("m")
j = D("j")
b = E("b")
f = F("f")
c = G("c")
d = H("d")
l = B("l")
g = E("g")

k.s = c
e.q = b
e.z = j
e.t = d
m.r = d
m.x = d
m.y = f
m.t = l
m.q = b
m.w = c
j.w = m
j.o = k
b.z = d
b.s = d
b.v = d
b.p = e
b.w = k
b.t = m
b.q = j
b.x = f
f.v = k
c.q = d
d.t = e
d.z = j
d.x = b
l.q = b
l.z = j
l.t = d
g.z = d
g.s = d
g.v = d
g.p = l
g.w = k
g.t = m
g.q = j
g.x = f
assert l.t.x.s.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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

k = A("k")
e = B("e")
m = C("m")
j = D("j")
b = E("b")
f = F("f")
c = G("c")
d = H("d")
l = B("l")
g = E("g")

k.s = c
e.q = b
e.z = j
e.t = d
m.r = d
m.x = d
m.y = f
m.t = l
m.q = b
m.w = c
j.w = m
j.o = k
b.z = d
b.s = d
b.v = d
b.p = e
b.w = k
b.t = m
b.q = j
b.x = f
f.v = k
c.q = d
d.t = e
d.z = j
d.x = b
l.q = b
l.z = j
l.t = d
g.z = d
g.s = d
g.v = d
g.p = l
g.w = k
g.t = m
g.q = j
g.x = f
assert l.t.x.s.x.z.txt == "d"