class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: B = None
        self.y: G = None
        self.s: J = None
        self.x: I = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: H = None
        self.p: A = None
        self.x: E = None
        self.r: I = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.z: H = None
        self.w: H = None
        self.r: J = None
        self.t: E = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: F = None
        self.z: C = None
        self.q: I = None
        self.o: E = None
        self.y: B = None
        self.x: I = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: G = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: I = None
        self.z: B = None
        self.y: I = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: H = None
        self.p: A = None
        self.x: E = None
        self.r: I = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.z: H = None
        self.w: H = None
        self.r: J = None
        self.t: E = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: F = None
        self.z: C = None
        self.q: I = None
        self.o: E = None
        self.y: B = None
        self.x: I = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: G = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: I = None
        self.z: B = None
        self.y: I = None
        self.p: B = None
        self.txt = txt

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

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