class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: F = None
        self.y: B = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.r: E = None
        self.z: E = None
        self.v: E = None
        self.s: E = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

j.z = d
j.o = d
j.t = e
j.y = k
j.v = f
k.r = e
k.z = d
k.t = b
k.o = h
k.u = h
h.o = j
b.z = k
d.y = f
d.t = h
d.u = h
d.r = k
d.z = k
e.u = k
m.w = f
m.u = f
m.r = d
m.z = d
m.v = d
m.s = d
m.o = d
m.x = j
f.z = k
f.v = b
f.p = d
assert j.t.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: F = None
        self.y: B = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.r: E = None
        self.z: E = None
        self.v: E = None
        self.s: E = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

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