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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: C = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: F = None
        self.q: D = None
        self.v: A = None
        self.t: H = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: D = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: I = None
        self.v: J = None
        self.o: J = None
        self.z: F = None
        self.r: G = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: G = None
        self.r: D = None
        self.s: G = None
        self.w: C = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: C = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: F = None
        self.q: D = None
        self.v: A = None
        self.t: H = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: D = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: I = None
        self.v: J = None
        self.o: J = None
        self.z: F = None
        self.r: G = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: G = None
        self.r: D = None
        self.s: G = None
        self.w: C = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.r: A = None
        self.txt = txt

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

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