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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: A = None
        self.z: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: D = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.u: C = None
        self.x: D = None
        self.v: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: B = None
        self.q: I = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: A = None
        self.z: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: D = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.u: C = None
        self.x: D = None
        self.v: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: B = None
        self.q: I = None
        self.z: A = None
        self.txt = txt

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

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