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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.z: H = None
        self.w: A = None
        self.r: H = None
        self.s: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: C = None
        self.v: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.z: H = None
        self.w: A = None
        self.r: H = None
        self.s: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: C = None
        self.v: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

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