class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.y: A = None
        self.x: C = None
        self.v: E = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: F = None
        self.z: D = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

c = A("c")
h = B("h")
m = C("m")
j = D("j")
e = E("e")
f = F("f")
l = G("l")
i = H("i")
b = G("b")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.y: A = None
        self.x: C = None
        self.v: E = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: F = None
        self.z: D = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

c = A("c")
h = B("h")
m = C("m")
j = D("j")
e = E("e")
f = F("f")
l = G("l")
i = H("i")
b = G("b")

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