class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.z: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: C = None
        self.x: E = None
        self.q: I = None
        self.s: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: E = None
        self.v: F = None
        self.w: A = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: H = None
        self.v: F = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: C = None
        self.x: E = None
        self.q: I = None
        self.s: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: E = None
        self.v: F = None
        self.w: A = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: H = None
        self.v: F = None
        self.w: H = None
        self.txt = txt

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

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