class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.o: D = None
        self.z: F = None
        self.u: G = None
        self.r: F = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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