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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: D = None
        self.w: J = None
        self.o: F = None
        self.s: A = None
        self.u: F = None
        self.r: J = None
        self.z: J = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: J = None
        self.s: J = None
        self.o: H = None
        self.q: G = None
        self.z: J = None
        self.y: C = None
        self.v: J = None
        self.r: G = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: F = None
        self.w: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: D = None
        self.w: J = None
        self.o: F = None
        self.s: A = None
        self.u: F = None
        self.r: J = None
        self.z: J = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: J = None
        self.s: J = None
        self.o: H = None
        self.q: G = None
        self.z: J = None
        self.y: C = None
        self.v: J = None
        self.r: G = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: F = None
        self.w: H = None
        self.txt = txt

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

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

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