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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: J = None
        self.s: C = None
        self.y: A = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: C = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: B = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: H = None
        self.r: G = None
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: J = None
        self.s: C = None
        self.y: A = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: C = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: B = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: H = None
        self.r: G = None
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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