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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: A = None
        self.r: D = None
        self.w: H = None
        self.t: A = None
        self.y: G = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: B = None
        self.o: H = None
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: G = None
        self.s: H = None
        self.p: E = None
        self.v: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: A = None
        self.r: D = None
        self.w: H = None
        self.t: A = None
        self.y: G = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: B = None
        self.o: H = None
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: G = None
        self.s: H = None
        self.p: E = None
        self.v: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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