class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: F = None
        self.z: J = None
        self.q: D = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.o: D = None
        self.t: I = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: C = None
        self.t: J = None
        self.x: I = None
        self.u: C = None
        self.q: C = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: C = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: H = None
        self.w: J = None
        self.z: E = None
        self.v: D = None
        self.o: E = None
        self.p: I = None
        self.q: D = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: F = None
        self.q: C = None
        self.r: A = None
        self.z: D = None
        self.s: A = None
        self.u: D = None
        self.t: A = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: F = None
        self.q: J = None
        self.u: A = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.o: D = None
        self.t: I = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: C = None
        self.t: J = None
        self.x: I = None
        self.u: C = None
        self.q: C = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: C = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: H = None
        self.w: J = None
        self.z: E = None
        self.v: D = None
        self.o: E = None
        self.p: I = None
        self.q: D = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: F = None
        self.q: C = None
        self.r: A = None
        self.z: D = None
        self.s: A = None
        self.u: D = None
        self.t: A = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: F = None
        self.q: J = None
        self.u: A = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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