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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: I = None
        self.x: J = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: G = None
        self.y: C = None
        self.t: G = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: E = None
        self.w: I = None
        self.u: G = None
        self.z: H = None
        self.y: C = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.y: D = None
        self.z: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.y: G = None
        self.v: I = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: D = None
        self.o: A = None
        self.p: G = None
        self.s: B = None
        self.txt = txt

i = A("i")
h = B("h")
e = C("e")
b = D("b")
f = E("f")
l = F("l")
g = G("g")
a = H("a")
k = I("k")
j = J("j")

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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: I = None
        self.x: J = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: G = None
        self.y: C = None
        self.t: G = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: E = None
        self.w: I = None
        self.u: G = None
        self.z: H = None
        self.y: C = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.y: D = None
        self.z: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.y: G = None
        self.v: I = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: D = None
        self.o: A = None
        self.p: G = None
        self.s: B = None
        self.txt = txt

i = A("i")
h = B("h")
e = C("e")
b = D("b")
f = E("f")
l = F("l")
g = G("g")
a = H("a")
k = I("k")
j = J("j")

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