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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: E = None
        self.v: A = None
        self.s: E = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: C = None
        self.y: C = None
        self.z: F = None
        self.s: C = None
        self.t: B = None
        self.r: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: E = None
        self.v: A = None
        self.s: E = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: C = None
        self.y: C = None
        self.z: F = None
        self.s: C = None
        self.t: B = None
        self.r: G = None
        self.txt = txt

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

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