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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: D = None
        self.s: A = None
        self.y: J = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: D = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: D = None
        self.s: A = None
        self.y: J = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: D = None
        self.q: A = None
        self.txt = txt

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

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

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

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