class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: E = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: G = None
        self.t: G = None
        self.r: A = None
        self.q: A = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.p: J = None
        self.u: H = None
        self.y: J = None
        self.z: G = None
        self.s: H = None
        self.x: G = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: H = None
        self.y: G = None
        self.v: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: H = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: D = None
        self.s: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: B = None
        self.txt = txt

a = A("a")
j = B("j")
m = C("m")
f = D("f")
d = E("d")
i = F("i")
g = G("g")
e = H("e")
h = I("h")
b = J("b")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: G = None
        self.t: G = None
        self.r: A = None
        self.q: A = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.p: J = None
        self.u: H = None
        self.y: J = None
        self.z: G = None
        self.s: H = None
        self.x: G = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: H = None
        self.y: G = None
        self.v: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: H = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: D = None
        self.s: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: B = None
        self.txt = txt

a = A("a")
j = B("j")
m = C("m")
f = D("f")
d = E("d")
i = F("i")
g = G("g")
e = H("e")
h = I("h")
b = J("b")

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