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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: H = None
        self.x: C = None
        self.r: H = None
        self.y: B = None
        self.v: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: E = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.s: E = None
        self.w: G = None
        self.o: E = None
        self.x: D = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: H = None
        self.x: C = None
        self.r: H = None
        self.y: B = None
        self.v: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: E = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.s: E = None
        self.w: G = None
        self.o: E = None
        self.x: D = None
        self.p: D = None
        self.txt = txt

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

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