class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.w: B = None
        self.z: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.w: B = None
        self.z: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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