class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: J = None
        self.w: C = None
        self.z: H = None
        self.u: H = None
        self.x: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: G = None
        self.p: D = None
        self.z: D = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.t: I = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: H = None
        self.txt = txt

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

n = A("n")
j = B("j")
h = C("h")
c = D("c")
e = E("e")
l = F("l")
d = G("d")
g = H("g")
b = I("b")
k = J("k")

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: J = None
        self.w: C = None
        self.z: H = None
        self.u: H = None
        self.x: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: G = None
        self.p: D = None
        self.z: D = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.t: I = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: H = None
        self.txt = txt

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

n = A("n")
j = B("j")
h = C("h")
c = D("c")
e = E("e")
l = F("l")
d = G("d")
g = H("g")
b = I("b")
k = J("k")

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