class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: I = None
        self.u: D = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: D = None
        self.w: I = None
        self.o: A = None
        self.s: I = None
        self.u: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.y: H = None
        self.v: B = None
        self.p: D = None
        self.t: H = None
        self.u: H = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: I = None
        self.u: D = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: D = None
        self.w: I = None
        self.o: A = None
        self.s: I = None
        self.u: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.y: H = None
        self.v: B = None
        self.p: D = None
        self.t: H = None
        self.u: H = None
        self.x: E = None
        self.txt = txt

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

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

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