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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: F = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: F = None
        self.x: H = None
        self.w: A = None
        self.t: H = None
        self.s: E = None
        self.y: H = None
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: I = None
        self.t: I = None
        self.u: F = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: F = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: H = None
        self.s: H = None
        self.x: B = None
        self.u: C = None
        self.w: F = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

d = A("d")
j = B("j")
m = C("m")
l = D("l")
k = E("k")
n = F("n")
c = G("c")
g = H("g")
a = I("a")
f = J("f")

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: F = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: F = None
        self.x: H = None
        self.w: A = None
        self.t: H = None
        self.s: E = None
        self.y: H = None
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: I = None
        self.t: I = None
        self.u: F = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: F = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: H = None
        self.s: H = None
        self.x: B = None
        self.u: C = None
        self.w: F = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

d = A("d")
j = B("j")
m = C("m")
l = D("l")
k = E("k")
n = F("n")
c = G("c")
g = H("g")
a = I("a")
f = J("f")

d.z = n
j.s = m
j.q = d
j.y = d
j.o = n
j.r = k
j.x = k
j.p = a
m.p = k
m.u = n
m.r = c
m.y = c
l.r = a
l.w = a
l.z = j
k.x = g
n.u = f
n.r = l
c.q = f
c.z = f
c.o = n
c.x = g
c.t = g
c.y = g
c.w = d
c.s = k
g.z = l
g.p = a
g.t = a
g.u = n
g.o = m
a.r = f
a.p = n
a.o = n
a.t = k
f.o = j
f.x = j
f.t = g
f.s = g
f.u = m
f.w = n
f.r = a
f.p = a
assert m.u.r.z.s.u.txt == "n"